• Hi there,

    This simple problem is driving me crazy.
    How can I make a checkbox readonly? not disabled?
    And when I set it as disabled, how can I do for not to receive it by email?

    I would be grateful if someone can enlighten me!
    best,
    Carl

    • This topic was modified 6 years, 4 months ago by Freegris.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi Freegris,

    Short answer: To make a checkbox readonly or disabled you would need to write a custom script. If you are at this skill level, leave this question open for others and comment that you are looking for the code.

    I’m not sure of your particular use-case for wanting a readonly checkbox. If you are creating a form that users need to fill out, I encourage you to think about the user experience of having a read-only checkbox.

    1. An input that is read-only will not change in visual appearance – You can guarantee that users will click on the checkbox and think it’s broken when they are unable to select anything.
    2. Depending on your theme, even disabled labels may not visually change appearance.
    3. Is it even necessary to show a user a field that is disabled? Would it be that difficult/expensive to edit the form or create a new one that doesn’t have the field in the first place?

    If you need this checkbox for some users but not others (based on segmentation or a previous field selection), I highly recommend implementing Conditional Logic or a Dynamic Field instead. Basically, only display the checkbox if it’s necessary for the user to fill out. Search on WordPress Plugins for ‘Conditional Logic’, ‘Dynamic Field’, or ‘Contact Form 7 Logic’ to see the various plugins.

    Thread Starter Freegris

    (@freegris)

    Dear Katie,
    users must be able to choose only the objects still available from the list: in this case, numbered art prints that remain of 12 copies.
    So, I need to add those “not available” with a checkbox: readonly

    thanks and I hope someone can help me with this fantastic plugin, my level of coding is basic.

    best

    • This reply was modified 6 years, 4 months ago by Freegris.
    • This reply was modified 6 years, 4 months ago by Freegris.
    • This reply was modified 6 years, 4 months ago by Freegris.
    • This reply was modified 6 years, 4 months ago by Freegris.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Checkbox readonly’ is closed to new replies.