Community
Why have some form validations (RegExp patterns) stopped working?
Some of the RegExp patterns has suddenly stopped working in forms. This means that user can now input things that is not valid. The browser gives and error in the console log but to the user the error is "silent". Here is an RegExp that no longer works:
```Text pug
+formElement({
name: 'mobile',
label: 'Mobile phone',
pattern: '^[0-9-+\s()]*$'
})
```
This gives the following error in the console log:
```
Pattern attribute value ^[0-9-+s()]*$ is not a valid regular expression: Uncaught SyntaxError: Invalid regular expression: /^[0-9-+s()]*$/v: Invalid character class
```
What could be the issue?
Posted by Robert Lundsten over 1 year ago
Does Onify support Bootstrap for forms and dashboards?
Is it possible to use Bootstrap components in forms and dashboards?
Posted by Robert Lundsten almost 3 years ago
Open custom modal in a form without redirecting to it
I have tried to figureout howto open modal in a form in a such way as it works in workspace item listing.
Posted by Markus Kalske almost 3 years ago
Item card and nested json array
Item card cannot show nicely nested array details. My colleague had information that he wanted to show to the end user. I suggested to create a more details button to the item and make a form that would show the more details. This solution we ended up.
I noticed that this solution could be handy for others also who have nested arrays in their item.attribute.nestedarrayjsondata, maybe Onify support want to put this solution to the forms section how to show static nested json data from item card.
block append formConfig
-var box = form.items[0]
if(mailbox.attribute.nestedarraygroup)
-var groupsarray = JSON.parse(box.attribute.nestedarraygroup)
else
-var groupsarray = 'none'
+formOptions({
formDescription: box.attribute.displayname,
pageTitle: 'Box details',
formTitle: box.name,
hideSubmitButton: true,
backButtonName: t('back'),
})
block formContent
if(groupsarray.groupname)
table(style='width:100%',border='0')
tr
th(style='width:40%') <b>Resource group:</b>
th <b>Nested groups:</b>
tr
td #{groupsarray.groupname}
td #{groupsarray.groups}
Posted by Markus Kalske over 3 years ago
How do I add a color picker in a form?
I want to add a color picker in a form. How do I do that?
Posted by Robert Lundsten over 3 years ago
Feature request about custom html response colors
It would be nice to have user profile color picker for some responses. If user would have adjusted responses like info,warning,error,success to own wanted colors and those would have saved into the user account settings. I could use those to color my html responses with user wanted colors beside the default scheme of responses color. This could be one way to improve the visibility issue of color issues of users reports about selected text colors. Read user color scheme about these settings from user settings and use those in your responses. I would also want to be able to have a color picker with preview box to set certain color if user wants response to be shown in that color.
Posted by Markus Kalske over 3 years ago
Minimum number of characters in form field
Is it possible to set a minimum number of characters that must be entered in a form field and that the user is made aware of this before submitting the form?
Posted by Henrik Andersson almost 4 years ago
Feature Request - Protection against robot spam
We would like a feature to add protection against robot spam, like Captcha, in forms that are public.
Posted by Henrik Andersson almost 4 years ago