• Resolved benh123

    (@benh123)


    Hi,

    Is there a way to have check boxes/drop down menu and to show an image to the right based upon what is selected?

    Thanks,

    Ben

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

    (@codepeople)

    Hello @benh123

    Thank you very much for using our plugin.

    Yes, that’s possible.

    You can insert multiple “Media” fields in the form to load the images and configure them as dependent on the checkbox or dropdown choices. More information about dependencies by reading the following blog post:

    https://cff.dwbooster.com/blog/2020/03/01/dependencies

    Best regards.

    Thread Starter benh123

    (@benh123)

    Hi,

    thanks for your response.

    How would i create multiple depedancies based on different options?

    I.E I want a particular image to show if:

    ‘Recommended Number of panes’ = 3
    &
    ‘Colour*’ = Ext 7016/ Int7016 (checkbox)

    Many thanks,

    Plugin Author codepeople

    (@codepeople)

    Hello @benh123

    You can use a calculated field to define the dependencies.

    For example, assuming the “Media” field is the fieldname123, the “Recommended Number of panes” is the fieldname1, and “Colour” is the fieldname2. You can insert a calculated field with the equation:

    (function(){
        IGNOREFIELD(123);
        if(fieldname1 == 3 && (IN('Ext 7016', fieldname2|r) || IN('Int 7016', fieldname2|r)))
        {
            ACTIVATEFIELD(123);
        }
    })()

    Best regards.

    Thread Starter benh123

    (@benh123)

    Hi,

    Cant seem to get that to work with this:

    (function(){
        IGNOREFIELD(66);
        if(fieldname27 == 3 && (IN('Ext 7016', fieldname25|r) || IN('Int 7016', fieldname25|r)))
        {
            ACTIVATEFIELD(66);
        }
    })()

    66 – Media
    27 – Recommended number of panes
    25 – Colour

    Thanks,

    Plugin Author codepeople

    (@codepeople)

    Hello @benh123

    With the information provided, I can check only the equation’s structure.

    Please, include the link to the page with the form to check it in action.

    Best regards.

    Thread Starter benh123

    (@benh123)

    Hi,

    Link to calc is – http://bsbi.co.uk/bifold-door-calc/

    Thanks,

    Plugin Author codepeople

    (@codepeople)

    Hello @benh123

    The form on the webpage http://bsbi.co.uk/bifold-door-calc/ does not include a calculated field with the equation you sent me previously.

    Please, note the equations use by default the choices’ values. And the choices’ values in your fieldname25 field are zero. So, the previous equation will fail. If you want to use the choices texts in the equation, you should edit the equation as follows:

    (function(){
        IGNOREFIELD(66);
        if(fieldname27 == 3 && (IN('Ext 7016', fieldname25|v) || IN('Int 7016', fieldname25|v)))
        {
            ACTIVATEFIELD(66);
        }
    })()

    Best regards.

    Thread Starter benh123

    (@benh123)

    Hi,

    I’ve added that exactly as above but the image isnt appearing.

    Not sure what im doing wrong?

    Thanks,

    Ben

    Plugin Author codepeople

    (@codepeople)

    Hello @benh123

    You don’t have two choices “Ext 7016” and “Int 7016”. You have only whan choice “Ext 7016 Int 7016”. So, the equation would be:

    (function(){
        IGNOREFIELD(66);
        if(fieldname27 == 3 && IN('Ext 7016 Int 7016', fieldname25|v))
        {
            ACTIVATEFIELD(66);
        }
    })()

    Best regards.

    Thread Starter benh123

    (@benh123)

    That works perfectly thank you!

    Thread Starter benh123

    (@benh123)

    The only problem I have noticed – when an image is shown it now stops the other calculated field (at the bottom showing the price) from showing a price and it now shows £0 is there any way to stop this?

    Thanks

    Plugin Author codepeople

    (@codepeople)

    Hello @benh123

    This equation does not affect the other equations in your form. However, you have some parser errors in other equations.

    For example, you have the equation IF(fieldname17*1

    However, it is incorrect. The IF operation has the structure IF(condition, value when condition true, value when condition false)

    You have the equation fieldname20*fieldname3 but there is no fieldname20 on your form.

    I recommend you to check every equation on your form.

    Best regards.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Show image’ is closed to new replies.