skip to Main Content

I need to make a form with the contact form 7 plugin, and for a list of checkboxes to be able to make the last option with others: , and if it is checked, to be able to enter text.. I can’t really succeed.. do you have something suggestions?

2

Answers


  1. You can use the conditional field Plugin for that.

    https://wordpress.org/plugins/cf7-conditional-fields/

    So for Checkbox "Other" You make the "Other Text" Field visible otherwise hidden.

    Login or Signup to reply.
  2. You can use a combination of checkbox and text input fields. First, create your checkboxes using the ‘checkbox‘ shortcode, and then add a conditional text input field using the ‘text‘ shortcode.

    Here’s an example shortcode snippet:

    [checkbox your-checkbox "Option 1" "Option 2" "Others"]
    [text your-other-option placeholder "Enter your option here" id:your-other-option]
    

    Replace ‘your-checkbox‘ and ‘your-other-option‘ with unique field names. This setup will display checkboxes for the predefined options and a text input field when the "Others" checkbox is checked, allowing users to provide custom text. Make sure to adjust the styling and validation according to your needs.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search