Hello @joskis,
Actually, I don’t understand why you’ve implemented the equations in that way, or the reasons for calling the DOM object of the fields directly if the plugin encapsulates this process.
Ok, returning to your initial question. I would recommend the use a date field in the form, instead to emulate it with a text field, because in this case you should parse the field’s value to generate the date object. So, assuming there is a date object in your equation, for example:
var the_date_object = new Date();
and you want to convert the value of the text field: fieldname19 in a date object too for comparing with the variable. I’ll access to the field through its DOM object because you have decided implement the equation in this way:
var f19 = jQuery('[id*="fieldname19_"]').val().slit('.'),
f19_date_obj = new Date(f19[2], f19[1]*1-1, f19[0]);
Now, assuming you want to display the field with name: fieldname1 if f19_date_obj<the_date_object and the fieldname2 field in other cases, you can use the following piece of code as part of your equation:
jQuery('[id*="fieldname1_"],[id*="fieldname2_"]').hide();
if(f19_date_obj<the_date_object)
{
jQuery('[id*="fieldname1_"]').show();
}
else
{
jQuery('[id*="fieldname2_"]').show();
}
The situation described and the fields’ names are hypothetical, only to explain the process, even, I’m accessing to the fields with jQuery because you have implemented the equation accessing to the DOM objects.
I’m sorry, but the support service does not cover the implementation of the users’ projects (forms or formulas), so, if you need additional help implementing your code, I can offer you a custom coding service from my private website:
https://cff.dwbooster.com/customization
Best regards.