Requires: phpFox version 4.6.0 or higher.
Multiple Languages Field (field_language)
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)
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 |