• Resolved moxymore

    (@moxymore)


    Hello,

    Thanks for your plugin, but I have spotted a bug : the true/false field isn’t adding a “required” attribute even if it is correctly configured on the ACF Group side.

    Can you please provide a quick fix for it ? As said in the title, it’s only one word to add at the end of the input (‘required’) in order to activate the HTML5 form validation feature.

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter moxymore

    (@moxymore)

    Hi again,

    You have answered at a post 2 days ago but skipped mine. I just would like to know if you were able to reproduce the issue, if it’s a know bug or if something is planned to correct this.

    Regards.

    Plugin Author philkurth

    (@philkurth)

    Hi @moxymore,

    I manage these tickets based on email notifications and for some reason I didn’t receive a notification for your first submission — definitely not intentionally skipping your question.

    ACF handles the field rendering (not Advanced Forms) and when I do a test locally, I don’t see required attribute on the true/false field’s checkbox input in the front end form OR in the WordPress admin. It appears that ACF doesn’t add this attribute to inputs of type checkbox and instead relies on JavaScript to handle all validation. I had a quick look to see if there is a filter you can use but the only real option I see is to replace the markup using the acf/render_field action hook which isn’t ideal.

    I did go ahead and test validation on a true/false field and it’s working on my end.

    Cheers,
    Phil

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Bug spotted (true/false field), but easily fixable’ is closed to new replies.