Joomla!® Templates (Shawn Kahl's Library) by Angie Radtke

Joomla!® Templates (Shawn Kahl's Library) by Angie Radtke

Author:Angie Radtke
Language: eng
Format: epub
Publisher: Addison-Wesley Professional
Published: 2013-10-15T00:00:00+00:00


type=“radio” Radio Buttons

Using radio buttons makes sense if you want to offer several options from which the user can choose only one. This is recommended for yes-or-no questions. You could imagine the following scenario for using radio buttons within a template:

Do you want to display the logo? Yes/No

The corresponding field would look like this:

Click here to view code image

<field name="displaylogo"

type="radio" default="1"

label=" TPL_BEEZ2_FIELD_DISPLAYLOGO_LABEL "

description="TPL_BEEZ2_FIELD_DISPLAYLOGO_DESC">

<option value="0">JNO</option>

<option value="1">JYES</option>

</field>

where the default value is set to 1 and therefore yes. In the index.php file, you can access its value with

Click here to view code image

$this->params->get(' displaylogo ');

and respond accordingly.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.