Title: Conditional logic processing
Last modified: October 7, 2017

---

# Conditional logic processing

 *  Resolved [Glenn](https://wordpress.org/support/users/continuit/)
 * (@continuit)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/conditional-logic-processing/)
 * Hi,
 * Is there any way to make the conditional logic process as the form is being filled
   in? It seems that it only gets processed when the submit button is clicked.
 * Is is also possible to hide/display fields based on the contents of dynamic fields?
   For example, I have a calculated field (either 1 or 0 depending on whether a 
   selected date is in the future or not) and I want to hide fields based on that
   but I can’t seem to get it to work
 * Thanks

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

 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/conditional-logic-processing/#post-9569908)
 * Hello!
 * 1.- Actually the conditional logic and formulas should be processed as the form
   is filled, if that is not happening please send me a link to the form and describe
   me the conditional logic that is happening only when someone click the submit
   button and i will check it.
 * 2.- That also should be done by adding the formula in a field (please make sure
   to add the formula in the ‘value’ field, not the placeholder field) and use that
   field in the conditional logic. If that is not working again please send me a
   link to the form and describe me the conditional logic that is not working and
   i will check it =).
 * Regards!
 *  Thread Starter [Glenn](https://wordpress.org/support/users/continuit/)
 * (@continuit)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/conditional-logic-processing/#post-9571705)
 * Hi Edgar,
 * I think the problem here is that I’m using a number field and it has a high and
   low value – not a single value field. I tried putting the formula on both (not
   at the same time) and it doesn’t seem to work.
 * Basically I want to hide/reveal stuff based on this
 * if ((new Date($$field_rnField11$$)) < (new Date()))
    return 1; return 0;
 * (i.e. if date is in the future – hide the submit)
 * I was testing the result of number field with this formula – have tried the formula
   in placeholder, min and max value fields and the behaviour isn’t what I would
   expect). I would expect that when I change the date, it reveal/hide the submit
   button accordingly.
 * Appreciate your assistance. The site is currently not available over the internet,
   I’ll try and resolve that if necessary.
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/conditional-logic-processing/#post-9573631)
 * Oh i see, i guess rnfield11 is a datepicker field?
 * Sorry the plugin doesn’t have an already build in function to compare a datepicker
   field with a normal date (there is only one to compare a datepicker with another
   datepicker) i will create one.
 * In the meantime this should work:
 * if(new Date($$field_rnField1$$.numericalValue)<new Date())
    return 1; return 
   0;
 * If you validate this formula it won’t work (because the validator doesn’t recognize
   the field property ‘numericalValue’ yet) but the formula should work if you preview
   your form or run it in a page.
 * Is this what you need? If not please let me know =).
 *  Thread Starter [Glenn](https://wordpress.org/support/users/continuit/)
 * (@continuit)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/conditional-logic-processing/#post-9575442)
 * Hi again,
 * I think you may have missed the main point of my last post. When a number field
   has no “value” field, only a min and max value, where do I put the formula for
   it to work? It doesn’t work on placeholder, min or max values. Should I be using
   a text field instead and put the formula on the value field of the text field?
 * BTW, that formula works fine without the .numericalvalue (tested by putting the
   formula in the placeholder and seeing the 1 or 0 being returned correctly).
 * Thanks
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/conditional-logic-processing/#post-9577810)
 * Oh i see, sorry. Yes please use a text input field as adding the formula in a
   placeholder won’t record it and won’t be usable in formulas. I will add a value
   property to the numeric field in the next release.
 * Regards.
 *  Plugin Author [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * (@edgarrojas)
 * [8 years, 7 months ago](https://wordpress.org/support/topic/conditional-logic-processing/#post-9577831)
 * Hello!
 * I already have the change that will add the ‘value’ property to the numeric fields.
   Unfortunately i can’t deploy it yet and won’t be able to do it in a while since
   i am in the middle of adding two big new fields (tables and repeaters). But if
   you want to have that value property in the numeric fields now please create 
   a support ticket at smartforms.uservoice.com and i will send you the file that
   you need to update in the plugin to have this =).
 * Regards!

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

The topic ‘Conditional logic processing’ is closed to new replies.

 * ![](https://ps.w.org/smart-forms/assets/icon-256x256.jpg?rev=1226707)
 * [Smart Forms - when you need more than just a contact form](https://wordpress.org/plugins/smart-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/smart-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/smart-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/smart-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/smart-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/smart-forms/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [EDGARROJAS](https://wordpress.org/support/users/edgarrojas/)
 * Last activity: [8 years, 7 months ago](https://wordpress.org/support/topic/conditional-logic-processing/#post-9577831)
 * Status: resolved