Is it possible to dynamically set a text box’s validation items using runtime modification?
Hi I have being playing with dynamic forms for a bit now (see https://support.geocortex.com/essentialsGSCForum?sub-nav=forum&main-nav=essentials&#!/feedtype=SINGLE_QUESTION_DETAIL&criteria=ALLQUESTIONS&id=9066000000007nnAAA) and am able to get some really good solutions for my needs.
My question is, is it possible to dynamically populate the validate items. According to the help document for the textboxformitems validationItems property has Gets the collection of validation items (i.e. no or sets option).
If it is possible any help on dynamically adding validation would be gratefully appreciated.
0
-
Hi Chris,
Yes, it is possible. For that you will need to use the Add To Collection <T> activity and use your form item validation items in the Collection input argument (e.g. textBoxFormItem.ValidationItems) and the Validation object in the Item input argument (e.g. new Geocortex.Forms.Client.Items.Validation.RequiredValidationItem() With { .Message = "Field required." }). If you need any other type of validations they are accessible via the Geocortex.Forms.Client.Items.Validation namespace.
Hope this helps,Sergio
0
Please sign in to leave a comment.
Comments
1 comment