Multiple Languages Field (field_language)
Requires: phpFox version 4.6.0 or higher.
phpFox Template
{field_language phrase='name' label='name' field='name' format='val[name_' size=30 maxlength=100}
Generated HTML
<div class="form-group"> <label for="name_en">Name in English (US)</label> <input id="name_en" class="form-control" type="text" name="val[name_en]" value="" size="30" maxlength="100"> <p class="help-block"></p> <div class="clearfix collapse-placeholder open"> <a role="button" data-cmd="core.toggle_placeholder">Name in other languages</a> <div class="inner"> <p class="help-block">If the category is empty then its value will have the same value as default language.</p> <div class="form-group"> <label for="name_es"><strong>Español (ES)</strong>:</label> <input class="form-control" type="text" id="name_es" name="val[name_es]" value="" size="30" maxlength="100"> </div> </div> </div> </div>
Result
!
Parameters
ID |
Name |
Default value |
Description |
---|---|---|---|
1 |
field |
|
|
2 |
phrase |
|
|
3 |
type |
|
Type of field: |
4 |
size |
|
Size of text input field (only available for type |
5 |
rows |
|
Number of rows of textarea field (only available for type |
6 |
label |
|
Label of language field |
7 |
format |
|
Format for name of language field |
8 |
required |
|
The language field is required or not |
9 |
help_phrase |
|
Var name of the phrase you want to show as field description |
Price Field (field_price)
Requires: phpFox version 4.6.0 or higher.
phpFox Template
{field_price price_name='price' currency_name='currency_id'}
Generated HTML
<div class="form-inline"> <select class="form-control" id="currency_id" name="val[currency_id]"> <option value="USD">U.S. Dollars</option> <option value="EUR">Euros</option> <option selected="selected" value="GBP">Pounds Sterling</option> </select> <input class="form-control" type="text" name="val[price]" value="0.00" id="price" size="10" maxlength="100" onfocus="this.select();"> </div>
Result
!
Parameters
ID |
Name |
Default value |
Description |
---|---|---|---|
1 |
currency_name |
|
Name for currency select |
2 |
price_name |
|
Name for price input |
Checkboxes for Genders (checkbox_gender)
Requires: phpFox version 4.6.1 or higher.
phpFox Template
{checkbox_gender use_custom=true name='val[gender][]'}
Generated HTML
<div class="custom-checkbox-wrapper"> <label><input type="checkbox" name="val[gender][]" value="1">Male</label> </div> <div class="custom-checkbox-wrapper"> <label><input type="checkbox" name="val[gender][]" value="2">Female</label> </div>
Parameters
ID |
Name |
Default value |
Description |
---|---|---|---|
1 |
use_custom |
|
Set |
1 |
name |
|
Name of checkboxes |