Label tag and selects

edited June 2014 in Bug Reports
Form builder uses label tags for inputs and textareas, but uses span tags with class 'label' for selects, when type is "enum". If the quantity of options is small, I suppose these are radios, but when a select, there can be noticeable style differences?

Comments

  • edited 3:19AM
    I'm not quite sure I follow. You mind outputting the HTML you are talking about of the form labels and inputs?
  • edited June 2014
    Sure.

    if the field is set as type "enum" the output for "render_divs" is:

    <div id="bf-salutation"> <span class="label">Salutation</span> <span class="field">...select goes here...</span> </div>

    change the field to "select" and the output becomes:

    <div id="bf-salutation"> <span class="label"> <label id="label_salutation" for="salutation">Salutation</label> </span> <span class="field">...select goes here...</span> </div>

    the "select" config writes a label tag, but enum doesn't. Depending on one's CSS, this results in inconsistent display, when in fact the intention (syntactically) is the same.

    I appreciate that enum has an auto feature that writes a select or radios depending on the number of options, which complicates the rendering. Maybe it's not that serious to worry about.
  • edited 3:19AM
    I see. That looks to be a bug. I've posted a fix on the develop branch for you to test out.
  • edited 3:19AM
    Tried the dev Form_Builder and it works perfectly!
Sign In or Register to comment.