reusable form
Application Type
Reactive
Service Studio Version
11.12.3 (Build 50494)

Hi,

Is there a way to implement reusable form that can be used at different pages without losing default behaviors/features of the form validation mechanism? E.g. I have a form with a mix of built-in and custom validations, and maybe using it at different screens. When searched through forum, all point to use block, but I found that it is not efficient to use (sidenote: I don't know how to use efficiently) because we lose form's built-in validation properties. What is the better way to handle this. 


Thanks,

joe

mvp_badge
MVP
Solution

Hi Kyaw,

I have attached the sample oml for your reference.

It has 2 input parameters so that you can enable or bypass the validation.

Please let me know if that helps.

Regards,

Manish Jawla

FormValidation.oml

mvp_badge
MVP

Hi Kyaw, 

You can create a webblock and define the default behaviors of your form inside it, for addition behaviors or validation you can supply input parameters with Boolean or integer values, and you can take decision on the basis of that which one you want to execute or bypass.

hope this helps.

Regards,

Manish Jawla

Hi Manish,

Thanks for quick response. Are you suggesting that I should embed the "form" inside web block? Or do you suggest to build the form from scratch i.e add input controls and set all necessary validations? Is there good references that I can use. 


Thanks.

mvp_badge
MVP
Solution

Hi Kyaw,

I have attached the sample oml for your reference.

It has 2 input parameters so that you can enable or bypass the validation.

Please let me know if that helps.

Regards,

Manish Jawla

FormValidation.oml

Hi Manish,


Many thanks. That's exactly what I wanted. 


Regards

Kyaw Khaung

mvp_badge
MVP
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.