Add data attributes to form fields...

I need to add data attributes to form fields to do some ajax stuff. I can't find anything in the docs regarding this. How can I do this? An example from my model:

function form_fields() { //... $fields["shift-$i-start-date"] = array( 'label' => "Shift $i Start", 'type' => 'date', 'value' => $startdate, 'data-shift-id' => $i, ); //... }

How to add the 'data-shift-id' attribute?

Comments

  • edited 1:33PM
    You can't easily do that right now unless you create a custom field. This will be addressed in the next release though.
Sign In or Register to comment.