Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor David Cramer

    (@desertsnowman)

    Nice idea, but right now not a feature. You can probably do it via CSS or look at the developer API https://docs.calderaforms.com/category/developer-api/ if you want to take a shot at making an add-on.

    Thread Starter AAcAN

    (@aacan)

    i can suggest simple html,js integration. but i’m not sure i’ll be able to make an add-on.

    <div id="emotion">
        <input type="radio" name="emotion" id="sad" />
            <label for="sad"><img src="sad_image.png" alt="I'm sad" /></label>
    
        <input type="radio" name="emotion" id="happy" />
            <label for="happy"><img src="happy_image.png" alt="I'm happy" /></label>
    </div>

    js:

    $('#emotion input:radio').addClass('input_hidden');
    $('#emotion label').click(function(){
        $(this).addClass('selected').siblings().removeClass('selected');
    });

    Css:

    .input_hidden {
        position: absolute;
        left: -9999px;
    }
    
    .selected {
        background-color: #ccc;
    }
    
    #emotion label {
        display: inline-block;
        cursor: pointer;
    }
    
    #emotion label img {
        padding: 3px;
    }

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Adding thumbnails to Radio selectors.’ is closed to new replies.