R Rob White Member Licensed User Nov 20, 2021 #1 Hi all, Can someone point me towards how to efficiently check ABMinput data. I am having problems with blank inputs (eg ABM.INPUT_NUMBER) inputs. Also on the same topic How do I know an input setup as email is false? I see the line turn red but how do I get that info in my code?
Hi all, Can someone point me towards how to efficiently check ABMinput data. I am having problems with blank inputs (eg ABM.INPUT_NUMBER) inputs. Also on the same topic How do I know an input setup as email is false? I see the line turn red but how do I get that info in my code?
alwaysbusy Expert Licensed User Longtime User Nov 20, 2021 #2 I normally never use anything other than _TEXT but I would suppose an _NUMBER would need a value (like 0). As for the validation, I check all fields when the user submits the data in B4J code (not using the validation of JavaScript) but you could do something like this: Code: Copy Dim inp As ABMInput = page.Component("inp") Dim script As String = $"return $('#${inp.ID}').hasClass('valid');"$ Dim isValid As Future = page.ws.EvalWithResult(script, Null) Log(isValid.Value) Alwaysbusy Upvote 0
I normally never use anything other than _TEXT but I would suppose an _NUMBER would need a value (like 0). As for the validation, I check all fields when the user submits the data in B4J code (not using the validation of JavaScript) but you could do something like this: Code: Copy Dim inp As ABMInput = page.Component("inp") Dim script As String = $"return $('#${inp.ID}').hasClass('valid');"$ Dim isValid As Future = page.ws.EvalWithResult(script, Null) Log(isValid.Value) Alwaysbusy