Single-select list (drop-down or radio buttons)

The single select list field type can be displayed in the submission form as radio buttons or drop-down list. In both cases the user can choose one option from a pre-defined list of values.

F2C Pro has some extra settings including required field and attribute option

Single-select list settings

The above images show the possible settings for this field.

1) Display as drop-down or radio buttons

2) If drop-down is selected, add an empty value text like - make a choice - and check the empty choice checkbox!

3) Add the options to the list. For value it is only possible to use basic characters and no spaces.

4) Add an attribute if you wish:
Example: class="select_list"

Adding the the single-select list data in your article

The template parameter used to 'paste' the content into the article. In this case it would be the choice made and can either be the value or the text.

Template parameter:

{$FIELDNAME} = the value (first column, see image)

{$FIELDNAME_TEXT} = the display text (second column, see image)

*(where FIELDNAME = the unique field name filled out in the settings)

Example:Setting a color in a Joomla article

Single-select lists are great to add some dynamic features to your template. In this example we will assume a drop-down list (field name = background_color) in a submission form with the following values.

Value          Display text
0F0              Green
F00               Red
CCC              Grey

The submission form will display a drop-down list of the color names White, Red and Grey.

In our F2C (main) article template we can add the following code

< div style="background-color:#{$BACKGROUND_COLOR}; width:100%; height:50px;" >
You have chosen the color {$BACKGROUND_COLOR_TEXT} for this box.
< /div>
*note there are some extra spaces in the html tags to prevent rendering





F2C Cheat-sheet

An overview of all template parameters (placeholders for your form data). These are used in your F2C intro and main template to parse the data from your submission forms into the Joomla article.

Download

Footer

Form2Content, a Joomla CCK Documentation © 2010 - 2015 Open Source Design | Powered by Form2Content