Forums

Remove red asterisk when only one option is required?

WhataMack 02 Aug, 2016
Hi, I have a set of checkboxes in my new form for different services that a customer can request. Only one service is required to be selected in order to submit the form, but they can select as many different services as they want.

Currently, each service has the red "required" asterisk next to it (as shown in this screenshot), which I'm sure will be confusing to some customers; they may think they will have to select each one. Is there some way to remove the asterisk in this situation?

GreyHead 03 Aug, 2016
Hi WhataMack,

First, as they are not required, don't set them as required.

You can use a single CheckBox group form them - the required validation there only needs one to be checked; or, you could write a custom validation function to check the set of Checkboxes to make sure that one is required and add that to each of the individual checkboxes.

Bob
WhataMack 03 Aug, 2016
Hi Bob. I was considering using a checkbox group at first, but I couldn't figure out a way to have the selections shown in a multi-column format, as shown in the screenshot. Instead, I used individual checkboxes within three resizable column containers, which are within a multi-column container to get the three-column layout.

Do you have any suggestions about how to achieve the three columns using a checkbox group?
GreyHead 03 Aug, 2016
Hi WhataMack,

You could just try giving all the individual CheckBoxes the same name (but keep the IDs different).

Or you could use a Custom Code element and add the HTML with a table layout. Provided you replicate the CF classes, etc, that should work OK.

There is the problem with a multi-column layout that it may now work well on phones, etc.

Bob
WhataMack 04 Aug, 2016
Hi Bob. I did as you suggested with the Custom Code element in order to get the three-column layout. I added a "Custom" element to the form, created a table with all the checkbox group code in it, and added that custom code into the "custom" form element. The checkbox group does work as needed in testing the form, but none of the checkbox group selections appear in the submission email. Is this because the checkbox group is in a "custom" form element, and the {custom} attribute in the email template is ignored? For example, the line in the email template for the custom code checkbox group is:

<tr><td></td><td>{custom}</td></tr>

This is the last thing I need to fix in the form and I'm hoping I'm just missing something obvious, or if there's a simple fix.
GreyHead 04 Aug, 2016
Hi WhataMack,

You need the name of the Checkbox group elements in the email - I'm guess that isn't 'custom' ?

Bob
This topic is locked and no more replies can be posted.