I have a website planner form here: http://www.ontargetpro.com/wordpress/?page_id=34 I don't like the way the checkboxes are no separated with line breaks. Is there any way to change this without making a new field for each option? Thanks!
I have a website planner form here: http://www.ontargetpro.com/wordpress/?page_id=34 I don't like the way the checkboxes are no separated with line breaks. Is there any way to change this without making a new field for each option? Thanks!
I didn't either... I wish they'd just fix the plugin.
Edit this plugin file here using the plugin editor:
contact-form-7/modules/checkbox.php
About 3/4 of the way down, you'll see this:
if ( $label_first ) { // put label first, input last
$item = '<span class="wpcf7-list-item-label">' . esc_html( $label ) . '</span> ';
$item .= '<input type="' . $input_type . '" name="' . $name . ( $multiple ? '[]' : '' ) . '" value="' . esc_attr( $value ) . '"' . $checked . $onclick . ' />';
} else {
$item = '<input type="' . $input_type . '" name="' . $name . ( $multiple ? '[]' : '' ) . '" value="' . esc_attr( $value ) . '"' . $checked . $onclick . ' />';
$item .= ' <span class="wpcf7-list-item-label">' . esc_html( $label ) . '</span><br />';
}
The <br /> tag is what I added, after </span> and before the end quote.
you dont need to do all of that.
if you go into your css files for Contact 7 do this:
go to plugins, under Contact 7, there is an edit field, click that and go to your css files.
Click on stylesheet.css
in the next to the last code block...shouldlook like this...
}
span.wpcf7-list-item {
margin-left: 0.5em;
}
Change it to look like this:
}
span.wpcf7-list-item {
margin-left: 0.5em;
display: block;
}
thats it, save and youre done. very easy fix but they should have that already done. I think it looks like crap aligned that way
HTH
I am jumping into the conversation because I have a related issue. I would like to apply a style class to the input tags <input>.
I could generate entirely new tags but that seems like extra work. i would gladly add to my style sheet but I need someway to specify c-f-7 form elements. Do you have a tip on how I can do that? I looked at the plug-in code and couldn't find the form name. (I tried some obvious ones but they didn't work.)
You must log in to post.