validator/preformatted widget

Hi everybody,

I would like to know in a form how must i do for preformatted a text-widget for contain a time with format “XX : XX”?
Is it possible to use regular expression with BPM 6.2.6 ?
Thanks for your help.

Hi,
You can use groovy script instead and use regular expression within. You can do something like this where “field_Text_field1” is your field id. This example is for 24 hrs pattern.

field_Text_field1.matches(“([01]?[0-9]|2[0-3]):[0-5][0-9]”)

Hope this helps,
Ronak

Hi,
You may have to use JS to do something like that. You can use html widget for that inside the form. This blog might help you
http://community.bonitasoft.com/blog/how-add-custom-javascript-your-bonita-bpm-forms

Great!
Thanks for your answer.
Your solution is for validator.
Is it possible to have a predefined widget for “time” (the user use the format during encoding) as the css for the red color or uppercase?

Thanks
Phil