• Resolved rey.abc

    (@reyabc)


    Hello again, im confused about how these work when they have more than 2 variables. For example, when i have only 1 variable its plain easy since i can just use (fieldname3==’cat’?250:500) meaning that cat=250 and the 2nd variable=500.

    But if i have 3 variable lets say, i cant do (fieldname3==’cat’?250:500:1000) [meaning that the 3rd variable i added equals 1000]. I cant do this because the formula wont work.

    Now… after checking the “calculation with dates” example that the plugin has, i realized that i can easily give each dropdown/checkbox variable a value by just putting the # of the value next to the name at the fields, to make it more easy to understand this is what i mean: https://puu.sh/2Fjny.png

    But my problem is i dont want the numbers to appear in the calculator, and they do appear if i do it the way “calculation with dates” do it.

    So is there a way i can do it without the numbers showing? Maybe someway to “nest” the first formula i was trying (i tried to nest it, didnt work the multiple ways i tried). By first formula i refer to this: (fieldname3==’cat’?250:500)

    Thank you very much!

    https://www.ads-software.com/extend/plugins/calculated-fields-form/

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

    (@codepeople)

    Hi,

    We are working in a new plugin version that allow separate the values of checkboxes and drop-down menues from its texts.

    A workaround in the current version is to hide the numbers in the field’s text with a tag <span>, like follow:

    Parking <span style=”display:none;”>10</span>
    Breakfast <span style=”display:none;”>20</span>
    Premium Internet Access <span style=”display:none;”>3</span>

    Thread Starter rey.abc

    (@reyabc)

    Thank you very much for the quick reply.

    I only have 1 doubt now, where should i add that? I tried adding it at the field settings next to the option: https://puu.sh/2Fzk1.png but it did not work as you can see here: https://puu.sh/2FzlC.png

    I suppose im adding it where im not supposed to.

    Plugin Author codepeople

    (@codepeople)

    Hi,

    Could you send me a link to the webpage for checking the issue, please?

    If you prefer, send me the link through the contact page in my website.

    Best regards.

    Thread Starter rey.abc

    (@reyabc)

    Hey, sorry for the late reply. My site happens to be new (i started uploading it yesterday, i have most of my articles in word still).
    I will send you a link to the webpage where a formula is showing, in that formula i tried the “<span>” trick but did not work, have a look at it when you can please :).

    Also i read the next version is coming up by the end of may, and that i will be able to hide fields values with it (pretty awesome!). Im very glad you guys are working on it.

    I will send you the webpage throught contact in your site.

    Thread Starter rey.abc

    (@reyabc)

    Just came back to say that i did got support by mail as CodePeople asked me to. These guys (ALL of them) even happen to talk spanish (my main language), sweet!

    Incase someone else has the same problem as i was having, this is the fix: in the next update they will add an option to hide value of a field, but for now you can use this trick on radiobuttons and checkboxes <span style=”display:none;”>VALUE-YOU-WANT-TO-GIVE-TO-THE-FIELD</span>.

    Ex: Dog <span style=”display:none;”>1.55</span>
    The field dog has a value of 1.55 and it (the value) wont show up on the frontend (what the user see).

    PD: This trick wont work with dropdowns, so i’d recommend using radiobuttons for now, and when the next update comes then change it to dropdown if you desire to.

    Thanks for all the support, im very pleased and already rated this plugin today (after trying it out for about a week and getting lot of support :)) Keep it up people!

    I would like to know how i can select some options from 2 fields to show a third one field
    using logical conditional

    for example

    field1:
    a
    b
    c

    field2:
    d
    e
    f

    so field 3 is the comb ination of field1(a) and field2(b)

    I would like to know how i can select some options from 2 fields to show a third one field
    using logical conditional

    for example

    field1:
    a
    b
    c

    field2:
    d
    e
    f

    so field 3 is the comb ination of field1(a) and field2(d)

    Plugin Author codepeople

    (@codepeople)

    Hi,

    If you want display a field depending of values in another two fields, you can’t use the dependencies like with only one field.

    For this demo, I will suppose you have four fields: fieldname1 and fieldname2, drop down menu, fieldname3 another control, any of them, and finally the fieldname4, a calculated field. And you want display the fieldname3 if the option selected in the fieldname1 has value 1, and the option selected in the fieldname2 has the value 3.

    For this case follow the steps below:

    1. Assign to the fieldname3 a classname through the “Add Css Layout Keywords” attribute, for example myclass

    2. Paste the following class definition in any of CSS files in your website

    .myclass{display:none;}

    3. And defines the equation associated to the fieldname4 like:

    (function(){
    if( fieldname1 == 1 && fieldname2 == 3)
    {
    jQuery( ‘.myclass’ ).show();
    }
    else
    {
    jQuery( ‘.myclass’ ).hide();
    }

    // The rest of the equation here

    })()

    You only should use the same principles of previous demo to your form.

    Best regards.

    Thanks a lot the plugin work as charm with the code you gave me. It is a very profesional atention, and fast reply you save My job.

    Best regards,
    Jorge

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Values in Dropdown/Checkboxes fields’ is closed to new replies.