For example,
<field name="name" type="text" required="ture" data-attribute-type="Guest" data-attribute-subtype="Guest1"/>
Here I have added data-attribute-type="Guest" and data-attribute-subtype="Guest1" these attributes and assigned values to it. Now I want to access those attributes/values while rendering jForm
<input type="text" name="jform[name]" id="jform_name" required="required" data-attribute-type="Guest" data-attribute-subtype="Guest1" >
You need to access custom attributes via the
elementsarray like this:Form field (I don't think you want to use
dataattributes):Then you need to define a custom Field and do your magic (probably in
renderorrenderField:This is all untested but hopefully gets you moving in the right direction.