Hi everyone,
Before v3 the input type radio or checkbox were placed outside the label like that :
<input id="edit-custom-search-paths-test-frq-key" class="form-radio" type="radio" checked="checked" value="http://some-site/search?ho=t&l=fr-FR&q=[key]" name="custom_search_paths">
<label class="option tooltipstered" for="edit-custom-search-paths-test-frq-key">test site </label>
I know this was intentionnally modified in Bootstrap v3 but I really need to put the label after the input so I can use pure css (no js) to display my radio buttons as tabs ('hide' the radio buttons and apply a class to the current label based on the pseudoclass :checked).
This is what I want to achieve : http://alistapart.com/article/radio-controlled-web-design
I checked the form-element.func.php file but didn't know really what to do.
Is there a way to do that ? disable this new behaviour ?
Can you point me to the good direction please ?
Many thanks
Comments
Comment #2
markhalliwellComment #3
benr commentedThis might help: https://www.drupal.org/node/2292899
Copy bootstrap_form_element() in your subtheme (replace bootstrap with the name of your subtheme) and replace
with
Comment #4
pringlz commentedAnother solution for question "How to styling by css input radios inside the label?" For Bootstrap theme its problem))
sites/all/themes/bootstrap/templates/system/form-element-label.func.php
In lines with $output add to $title span tag line 70, 80, 89
Comment #5
meles commentedIf you want to get results like this:
http://flatlogic.github.io/awesome-bootstrap-checkbox/demo/
work for checkbox and radio
(Need module: Font Awesome)
It would be correct to do so in template.php:
Comment #6
philsward commentedThanks @5xMELESx Seems to work out all right.
Comment #7
Katy Jockelson commentedThank you xMELESx - this was what I needed.