Skip Navigation

[Resolved] Hide Label for CRED form Single Checkbox

This thread is resolved. Here is a description of the problem and solution.

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 support ticket is created 2 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#2251601
Screenshot (42).png
Screenshot (43).png

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.

#2251963

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.

#2251979

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

#2253227

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.

#2254333

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/

#2254475

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/

#2255097

My issue is resolved now. Thank you!

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.