html textField with aria settings

14 views
Skip to first unread message

Patrick Flynn

unread,
Dec 7, 2017, 6:34:09 PM12/7/17
to ColdBox Platform
I am currently working on a project where all of my forms are based on the integrated html.startForm form setup for coldbox. I have hit a slight stop up in that I am unable to assign any aria settings to my form controls. It appears to be due to the setting name containing a dash in it which all aria settings are. Would there be a potential work around for this? I am trying the following code....


  #html.textField(

                       name="materialNo",


                        bind=prc.material,


                        label="Material Number:",


                        required="required",


                        size="50",


                        class="form-control",


                        wrapper="div class=controls",


                        labelClass="control-label",


                        groupWrapper="div class=form-group",


                        aria-describedby="materialnoHELP"


                )#

<small id="materialnoHELP" class="form-text text-muted">

Create a 6-digit ID number.

</small>



Ancient Programmer

unread,
Dec 7, 2017, 8:16:23 PM12/7/17
to ColdBox Platform
Try to place double quotes.

"aria-describedby"="materialnoHELP"

Patrick Flynn

unread,
Dec 12, 2017, 12:51:27 PM12/12/17
to ColdBox Platform
Thanks, that did the trick!
Reply all
Reply to author
Forward
0 new messages