registration form field

For Joomla! 3.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Locked
cossy
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Jul 14, 2010 2:55 pm

registration form field

Post by cossy » Fri Jul 31, 2015 7:49 am

Hi,

i made some custom registration form, but now i have problem with TOS form.
I want make hypelink in form, but dont know how, and i search all over, but didnt found anything.

Form field is like this:
<field
name="show_title"
type="checkbox"
label="Potrjujem, da se strinjam s Pravili in pogoji uporabe, ter jih v celoti sprejemam"
description="TOS"
value="1"
default="0"
required="true"
/>

Now i want text in label Pravili in pogoji uporabe make lik hyperlink

Is that possible or maybe any other way?

Thank you

jextn_support
Joomla! Apprentice
Joomla! Apprentice
Posts: 25
Joined: Thu Jun 25, 2015 1:19 pm

Re: registration form field

Post by jextn_support » Fri Jul 31, 2015 9:25 am

Hi,

Yes, Hyperlink is possible in label for example <a href="sample.php"><?php echo $this->form->getLabel('from'); ?></a> .

User avatar
kurchania
Joomla! Hero
Joomla! Hero
Posts: 2070
Joined: Mon Sep 21, 2009 6:56 am
Location: indore,india
Contact:

Re: registration form field

Post by kurchania » Sat Aug 01, 2015 8:58 am

@cosy
you can try something like this

Code: Select all

label="Potrjujem, da se strinjam s Pravili in <a href="//www.google.com">pogoji uporabe</a>, ter jih v celoti sprejemam"
            
that way it will parse the hyperlink tag in jform.

@jextn_support
Your solution wont work on specific word it will give hyperlink to whole url.
abhijeet kurchania
The future depends on what you do today

cossy
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Wed Jul 14, 2010 2:55 pm

Re: registration form field

Post by cossy » Sat Aug 01, 2015 12:24 pm

I solve this on other way...custom element must be created if you need fields that are not already exists on this list here https://docs.joomla.org/Standard_form_field_types


Locked

Return to “Joomla! 3.x Coding”