The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

How to Use Scale Styling on Standard Radio Buttons

Labels

This Discussion is public

Notifications

I really like the appearance of scale buttons on forms asking survey type questions. When Formidable Pr creates a scale, it inserts the frm_scale class into the individual options' wrapping div tags. Unfortunately, scale field option labels are all numeric. You can't have an option with the label N/A for example, which means you have to use standard radio buttons.

When Formidable Pro generates the HTML for radio buttons, it inserts the frm_radio class into the individual options' wrapping div tags. If you modify the frm_radio css to make it look like a scale, you impact every radio button on your site. However, it's relatively simple to use jQuery to selectively modify radio buttons to make them look like scales. The following code will do the trick. See the attached image to view the results.

<script>
jQuery(document).ready(function ($) {
$('#field_4210-0').attr('title', 'Not Satisfied at All');
$('#field_4210-1').attr('title', 'Somewhat Satisfied');
$('#field_4210-2').attr('title', 'Moderately Satisfied');
$('#field_4210-3').attr('title', 'Very Satisfied');
$('#field_4210-4').attr('title', 'Extremely Satisfied');
$('#field_4210-5').attr('title', 'N/A');
$('#field_4210-0').parent().parent().removeClass('frm_radio').addClass('frm_scale');
$('#field_4210-1').parent().parent().removeClass('frm_radio').addClass('frm_scale');
$('#field_4210-2').parent().parent().removeClass('frm_radio').addClass('frm_scale');
$('#field_4210-3').parent().parent().removeClass('frm_radio').addClass('frm_scale');
$('#field_4210-4').parent().parent().removeClass('frm_radio').addClass('frm_scale');
$('#field_4210-5').parent().parent().removeClass('frm_radio').addClass('frm_scale frm_last');
});
</script>

I am looking for help posting form data to another database table - saw your offer to help someone else but didn't know how to reach you.  Hoping you see this!

Please visit my website for contact details: http://victorfont.com/

Discussion closed.