Contact Form – Required Field

  • Unknown's avatar

    Hi! I am making a contact form. But I cannot quite get the ‘CHECKBOX’ to be required (*). Is there any way to require the sender to check the box first before he/she can submit the message?

  • Unknown's avatar

    Hi there,

    If you click on the Checkbox within the form, the block menu for that checkbox will appear. Click on the * icon and that will cause it to be required.
    If you can’t find that, open the block settings and find the option there under the Field Settings.
    Please tell us if you are having trouble doing this.

    I hope this helps!

    Just a reminder that this forum is for WordPress.com hosted websites. If you use the open-source WordPress software, you’ll need to go to their forum to get help: https://wordpress.org/support/forums/
    If you want to know more about the differences between WordPress.com and the WordPress software you can read the support post:
    https://wordpress.com/support/com-vs-org/

  • Unknown's avatar

    Hi! That’s apparently my problem, I can’t find the * icon nor the option in the Field Settings.

  • Unknown's avatar

    All right. This thread has been tagged for staff attention, so they’ll be able to guide you :)
    It may help if you share the URL of your site.

  • What is the URL of the page with the contact form you’re working on?

  • Unknown's avatar

    Hi there! Thanks for the response.
    I am working on https://fatfanatiq.wordpress.com/befeaturedapplication/ the site is still not launched. Thank you for helping me with this. :)

  • Hi there,

    It appears this option doesn’t appear if you have only one checkbox. This is a bug, and has already been fixed over in the Jetpack plugin where this block comes from. It should be fixed on WordPress.com as well once the Jetpack update containing the fix is released.

    Meanwhile you can add the required option by modifying the form’s HTML directly.

    In the editor, click the … icon top-right, and select the Code Editor option. Look for this line in the post:

    <!-- wp:jetpack/field-checkbox {"label":"I have read and agreed to the Terms and Policy of FAT Fanatiq and the Be Featured program.","defaultValue":false} /-->

    Change that line to:

    <!-- wp:jetpack/field-checkbox {"label":"I have read and agreed to the Terms and Policy of FAT Fanatiq and the Be Featured program.","required":true} /-->

    Then exit the code editor and update the page.

  • Okay, the fix has actually just been applied for WordPress.com, so you should be able to mark that field as required without having to modify the HTML now.

  • Unknown's avatar

    Thank you so much for your help with the HTML and the fix!
    I really appreciate it, I’ve been wondering why there wasn’t any * icon. Thanks!!

  • The topic ‘Contact Form – Required Field’ is closed to new replies.