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
(@continuit)
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.
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
(@continuit)
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
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.
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!