• Resolved hosshoss

    (@hosshoss)


    Hi, I’m having a bit of difficulty getting this to work
    I used an HTML content field to add the html & have added the css to the form to get it looking correct – I can’t seem to now use the radio buttons in the HTML field in my calculations – is there a way of doing this, or can I add a different style to each radio button using a standard radio button field?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @hosshoss

    Unfortunately in the HTML standard there are some controls whose styles cannot be edited in the same way than others, it is the case of the radio button, checkboxes and input files. The alternative would be hide the radio button at all using CSS, and display in their place some images with the different control’s states (ticked and unticked).

    For example, you can enter the following style definition into the “Customize From Design” attribute in the “Form Settings” tab (https://cff.dwbooster.com/images/documentation/form-settings-tab.png):

    
    #fbuilder .cff-radiobutton-field input{display:none !important;}
    #fbuilder .cff-radiobutton-field .dfield label span{
    display:inline-block;
    background:url("https://upload.wikimedia.org/wikipedia/commons/thumb/2/2a/Ic_radio_button_off_48px.svg/480px-Ic_radio_button_off_48px.svg.png") no-repeat 0 0;
    background-size:20px 20px;
    padding-left:20px;
    line-height:20px;
    }
    #fbuilder .cff-radiobutton-field .dfield input:checked + span{
    background-image:url("https://upload.wikimedia.org/wikipedia/commons/thumb/5/5d/Ic_radio_button_on_48px.svg/1024px-Ic_radio_button_on_48px.svg.png");
    }
    

    and that’s all.
    Best regards.

    Thread Starter hosshoss

    (@hosshoss)

    Thanks, but I need a different image for each of the radio buttons.

    Can a radio button inside the html field form not be used in the calculations?

    Plugin Author codepeople

    (@codepeople)

    Hello @hosshoss

    In this case you simply should enter the <img> tags as the choices’ texts, for example:

    <img src="https://live.staticflickr.com/4112/5170590074_714d36db83_c.jpg" style="width:40px;">

    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘FontAwesome as radio buttons’ is closed to new replies.