[Resolved] Display showing as div instead of span

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.

This topic contains 3 replies, has 2 voices.

Last updated by Beda 1 month, 1 week ago.

Assigned support staff: Beda.


I am trying to: Display a single checkbox on a user registration field

Link to a page where the issue can be seen: hidden link

Some one recommended I report this: Display Mode is not correct. Should be "span" and not "div",

<div class="form-group">
<label>Subscribe for announcements</label>
<div class="js-wpt-field-items js-wpt-repetitive wpt-repetitive" data-initial-conditional="" data-item_name="checkbox-Keep me up to date"><input type="checkbox" id="cred_user_form_56_1-checkbox-3-1582303603" name="Keep me up to date" data-wpt-type="checkbox" data-wpt-id="cred_user_form_56_1_cred_user_form_56_1-checkbox-3-1582303603" data-wpt-name="Keep me up to date" value="1" class=" wpt-form-checkbox form-checkbox checkbox" preset_value="" cred_generic="1" placeholder="" preview="" urlparam="">&nbsp;
<label class="wpt-form-label wpt-form-checkbox-label" for="cred_user_form_56_1-checkbox-3-1582303603">Keep me up to date</label>
<input type="hidden" name="_wptoolset_checkbox[cred_user_form_56_1_Keep me up to date]" value="1">

My issue is the field slug is showing on the front end. The single checkbox displays like checkboxes with a main label and a checkbox label. I'm not clear on the selections. I was recommended to use underscores in the field slug, which ended up being a duplicate of the label.(see img of output)



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

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

I'm not sure what you mean.

On the page you share I see a Labeled checkbox "Keep me up to date", not like on the screenshot.
That's not a DIV, it's an INPUT tag.
That can't be a span, as it needs to be an input.

Inputs have Labels, that's where you see the text
All of this, is in a DIV.
But you can easily remove that DIV by removing it from the HTML in the Form Editor:
hidden link

For this you'll need to use expert mode, and remove the DIV around the part below of the field:

<div class="form-group">

There you can also remove the Label if you want.

Does this help?


Ah ok, that makes sense. The the name selector in a hook would change?



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

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

What do you mean with "The the name selector in a hook would change?"

There is no "hook" for this if you refer to WordPress Actions and Filters.