• Resolved iboudreau

    (@iboudreau)


    Hello,

    I’m considering using your plugin for a client who needs a form capable of calculations.

    I need to know if the form styles can be edited with CSS.

    And if I can set up conditional recipients. Such as, if a certain value is entered into a field, the email is sent to a specific person. For example, if a user enters a certain member number, the message is sent to one recipient. But if it’s another number, then it goes to another recipient.

    Thank you.

    https://ww.wp.xz.cn/plugins/calculated-fields-form/

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

    (@codepeople)

    Hi,

    The plugin includes multiple predefined designs to use with the forms, so you can assign any of predefined layouts, and then, to modify the CSS file to use the design you prefer.

    About your question, the Pro version of calculated field allows to send a confirmation email to address entered through the form, but with a formula associated to a calculated field it is possible to assign an email address to the field, and send to it the confirmation email.

    I’ll try to explain the process with an example:

    1. Inserts an email field in the form, I’ll assume that its field name is fieldname1, and then, assign to this field the classes names: hide the_email, through the “Add Css Layout Keywords” attribute. The classes names are separated by the space character.

    2. Insert a text field to allow the users to type their codes, I’ll assume that its field name is fieldname2.

    3. Inserts a calculated field in the form, and tick the option: “Hide Field From Public Page”, because this field would be used as an auxiliar field and is not important in the form’s interface.

    If the email address of the user with the code 123 is [email protected]. and the email address of the user with the code 321 is [email protected]

    4. The equation associated to the calculated field would be:

    (function(){
    var email = '';
    if(fieldname2==123) email='[email protected]';
    if(fieldname2==321) email='[email protected]';
    jQuery('.the_email input').val(email);
    })()

    You only should use a similar logic in your project.

    Best regards.

    Thread Starter iboudreau

    (@iboudreau)

    Thank you for your response.

    Am I able to define a set of values and match them to a specific address?

    Example: there are 100 users with individual member IDs 1 thru 100.

    What needs to happen is:

    if fieldname2 = 1-50 than email=’[email protected]
    if fieldname2 = 51-100 than email=’[email protected]

    I need the ability to enter a range, instead of entering each individual ID.

    Thank you

    Plugin Author codepeople

    (@codepeople)

    Hi,

    If you want use a range of values in the conditional statement, the equation should be edited like follow:

    (function(){
    var email = '';
    if(1<=fieldname2 && fieldname2<=50) email = '[email protected]';
    if(51<=fieldname2 && fieldname2<=100) email = '[email protected]';
    jQuery('.the_email input').val(email);
    })()

    Best regards.

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

The topic ‘Conditional Recipients & CSS’ is closed to new replies.