Home › Toolset Professional Support › [Resolved] Hide Label for CRED form Single Checkbox
Problem:
Remove/hide field label in Toolset post forms.
Solution:
The field label is setup as HTML codes in form content, you can try these:
Edit the post form you mentioned above, and switch to "Expert mode", remove those field labels manually.
Relevant Documentation:
100% of people find this useful.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | 9:00 – 13:00 | - |
- | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | 14:00 – 18:00 | - |
Supporter timezone: Asia/Hong_Kong (GMT+08:00)
This topic contains 6 replies, has 2 voices.
Last updated by simchaH 2 years, 12 months ago.
Assisted by: Luo Yang.
Hi,
I have a bunch of Single Checkboxes, and I want to get rid of all the labels ON TOP of the checkbox. I found this code in a previous support thread:
add_filter('cred_filter_field_before_add_to_form', 'remove_cb_label', 10, 2);
function remove_cb_label($field, $computed_values){
if(isset($field['id']) && in_array($field['id'], array('your-field-slug'))){
$field['title'] = '';
}
return $field;
}
But it hides the label that is right next to the checkbox. I want to keep that label, and only get rid of what is directly on top of it. When I try to simply "backspace" the label name in the admin form area, it automatically comes back and shows up. Any idea how to make it go away?
See images below.
Hello,
The field label is setup as HTML codes in form content, you can try these:
Edit the post form you mentioned above, and switch to "Expert mode", remove those field labels manually.
If I change to Expert Mode, will that ruin my form and make me start the form from the beginning again? I am nervous about that, since my form is quite large and has some conditionals.
Thanks
No, switching to "Expert mode", won't ruin your form, but switch back to visual mode, might conduct unexpected result.
Since you are using a quite large post form and has some conditionals, you can try these:
1) Design your post form first in normal mode, insert those fields, setup the conditionals, and put them into where you want.
2) Switch to "Expert mode", remove the checkbox field labels.
Thanks, it worked. Just one more question about this, I now have a cred form field shortcode that looks like this:
[cred_field field='shiur-friday' force_type='field' class='form-check-input' output='bootstrap']
The checkbox displays with the word "Friday" directly in front of it. Is there a way to change the words to "Friday/Friday Night" instead of just Friday?
Thanks!
New threads created by Luo Yang and linked to this one are listed below:
https://toolset.com/forums/topic/one-more-question-about-forms-field/
I assume the original question of this thread is resolved, according to our support policy, we prefer one ticket one question, for other new issues, please check the new thread here:
https://toolset.com/forums/topic/one-more-question-about-forms-field/
My issue is resolved now. Thank you!