Create new form fields for custom article options, e.g. /templates/t3_bs3_blank/etc/extrafields/myfields.xml
In myfields.xml, create a repeating group to appear in a modal. Example:-
<field name="list_subtitles" type="Repeatable" icon="list" description="TPL_GROUP_EXTRA_FIELDS_SUBTITLES_DESC" label="TPL_GROUP_EXTRA_FIELDS_SUBTITLES_LABEL" default="{'subtitlelanguage':['']}"> <fields name="params"> <fieldset hidden="true" name="list_subtitles" repeat="true"> <field name="subslang" multiple="false" type="list" label="TPL_GROUP_EXTRA_FIELDS_SUBTITLES_SUBTITLE_TITLE" description="TPL_GROUP_EXTRA_FIELDS_SUBTITLES_SUBTITLE_DESC" filter="unset"> <option value="1">English</option> <option value="2">Spanish</option> <option value="3">German</option> </field> <field name="subssrc" type="url" showon="subslang:2" label="TPL_GROUP_EXTRA_FIELDS_SUBTITLES_SUBTITLE_FILE" description="TPL_GROUP_EXTRA_FIELDS_SUBTITLES_SUBTITLE_FILE_DESC" filter="unset" /> </fieldset> </fields> </field>
Click the 'Select' field to display the modal. In the modal, initially there should be only the select list showing - the text field should not appear until the select option value '2' has been selected.
However, the text field is displayed at all times. The showon function works as expected outside of a modal, however. E.g:-
<fieldset hidden="true" name="list_subtitles" repeat="true">
<field name="subslang" multiple="false" type="list" label="TPL_GROUP_EXTRA_FIELDS_SUBTITLES_SUBTITLE_TITLE" description="TPL_GROUP_EXTRA_FIELDS_SUBTITLES_SUBTITLE_DESC" filter="unset">
<option value="1">English</option>
<option value="2">Spanish</option>
<option value="3">German</option>
</field>
<field name="subssrc" type="url" showon="subslang:2" label="TPL_GROUP_EXTRA_FIELDS_SUBTITLES_SUBTITLE_FILE" description="TPL_GROUP_EXTRA_FIELDS_SUBTITLES_SUBTITLE_FILE_DESC" filter="unset" />
</fieldset>
However, this removes the repeatable nature I desire.
Joomla 3.5.1
Category | UI/UX | ⇒ | Fields UI/UX |
Status | New | ⇒ | Information Required |
Yes, unfortunately it appears to be no different in 3.6.5 using the above example.
Status | Information Required | ⇒ | Needs Review |
thanks for Info, set Status to "Need Review" on Issue Tracker.
No chance it will be fixed anytime.
Use https://docs.joomla.org/Subform_form_field_type instead of Repeatable
.
There 'showon' should work.
Status | Needs Review | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-04-08 20:02:35 |
Closed_By | ⇒ | Bakual |
Closing as it's a known issue which will not be fixed
The repeatable formfield is deprecated and replaced by the subform one for reasons like this one.
@grantg182 can you confirm Issue on latest Staging too?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/10624.