Skip Navigation

[Resolved] Inputs are inside labels

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

Problem:
Form radio inputs have the labels wrapping the inputs which makes it difficult to style them with CSS.

Solution:
This occurs when your settings say that the site is not using Bootstrap. Edit the cred_field shortcode that inserts the radio field and add the attribute output="legacy" to force the markup so that the inputs are outside the labels.

This support ticket is created 5 years, 5 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.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by stuartm-2 5 years, 5 months ago.

Assisted by: Nigel.

Author
Posts
#1317007
old web.PNG
new web.PNG

Hello

Im trying to style radio inputs same as the old website. In the old website when i expand with the inspector tool of a custom field created by Toolset inputs are outside the label so i can style them properly while on the new website i applied same styles, nothing happened and noticed that inputs are nested inside the label so i cannot style them.

Did this happens with updates of Toolset?
How can get the input seperate from label?

Take a look at the pics.

#1317091

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2019-08-15 at 13.46.33.png

I just added a radio field to a form and I see the same as you show in your old web screenshot, namely that the label follows the input rather than wraps it (see my screenshot).

I'm not aware of this changing with any plugin version, but what—in any case—Forms and Types versions does your new site use?

Is there anything different about the set-up of the form and where you inserted the fields compared to the old site?

#1317115

It is exactly the same, as i am migrating content, just doing copy paste, same custom fields same styling. I thought this happened with toolset updates so I tried using older versions of Types and Views the same ones as my old website, but nothing changes. Havent tried older version of Forms yet.

These are currently on the new site Toolset forms 2.5, Types 3.3.2, Views 2.8.4

Any idea why this is happening?

#1317155

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

On my site I'm using the current versions, could you update yours to the same and check again.

If you still see the output in that format I'd like to take a look at your site if I may so that I can try and see what it is in your set-up that might account for it.

I'll mark your next reply as private now in case updating the plugins doesn't help.

#1317809

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Stuart

OK, so I determined that the radio input HTML is output in the problematic way when your settings indicate that the site is not using Bootstrap.

This is even though the cred_field shortcode as an attribute output="bootstrap", which one would think outputs the HTML in the format expected by Bootstrap, even if Bootstrap isn't loaded.

However, you don't need to add Bootstrap to the site to get the desired format. If you edit the cred_field shortcode so that the output attribute is actually output="legacy" then you should get the result you desire.

This is confusing and surely not intended. I'll raise it with the devs and ask for it to be updated.

#1320859

I see. Thank you