Forum
Calc Builder Support
Calc Builder supportForums
Public write access is disabled. Please login
Re: Validate text input is greater than an inline field 21.09.2015 09:19
Hi,
here you can find complete information about how to add custom validations to your form:
https://www.moonsoft.es/en/help/2-cbsupport/3040-validate-field-greater-or-less-than-other-field
This example is intended to add validation 'greaterthan' between 2 input fields, if you need the second one to be an inline field, this code:
//Replace here 'number1' for your field name
var valueinit=CB("input[fldname=number1]").val();
must be replaced with:
//replace inlinefld for your own inline field name
var valueinit=CB("div[fldname=inlinefld]").html();
The rest of the approach explained on the post should be still valid for your case. Please note the inline field is not present at the time the page is loaded, as it's calculated by the server, it only has inner content when the first inline calculation is launched.
Hope this helps, regards
Moonsoft Team
www.moonsoft.es
here you can find complete information about how to add custom validations to your form:
https://www.moonsoft.es/en/help/2-cbsupport/3040-validate-field-greater-or-less-than-other-field
This example is intended to add validation 'greaterthan' between 2 input fields, if you need the second one to be an inline field, this code:
//Replace here 'number1' for your field name
var valueinit=CB("input[fldname=number1]").val();
must be replaced with:
//replace inlinefld for your own inline field name
var valueinit=CB("div[fldname=inlinefld]").html();
The rest of the approach explained on the post should be still valid for your case. Please note the inline field is not present at the time the page is loaded, as it's calculated by the server, it only has inner content when the first inline calculation is launched.
Hope this helps, regards
Moonsoft Team
www.moonsoft.es