-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support placeholders for inputs in an element template #852
Comments
Hi @mbiciin , thank you for opening this issue. What Problem are you trying to fix with placeholders? It is possible to add default values to element templates by setting the Please also adjust the Ticket to use the Feature Request Template, so everyone can follow your train of thought. Cheers! |
Hi @marstamm I updated the ticket. Please, let me knw if you need more details. |
Thank you for updating the Issue, this makes the problem clearer. I see 2 separate issues you mentioned:
Is this related to this Issue or would this be a separate Bug report? The behavior for updating templates is to not override changes by the user. If you believe this is wrong or unexpected, please open a Bug ticket so we can keep the discussions focused on one thing at a time 😄
To make sure I understand the use case correctly:
Is this correct? |
@mbiciin I'm not sure if that is what I expect of a placeholder. As far as I am concerned a placeholder gives me a hint on the (optional) semantic contents of a field. If the field assumes certain default value I assume it to be pre-filled with that default value. So if I understand correctly we think about two things here:
Cf. MDN on placeholders:
|
+1 @nikku The behavior described in #852 (comment) would rather be achieved with an initially empty input, where the default value is applied either in the backend service or through a hidden input mapping, not with a placeholder attribute |
Guess placeholders (in the HTML sense) are still a valid feature request. Moving to backlog. |
Implemented via bpmn-io/bpmn-js-element-templates#92. |
Is your feature request related to a problem? Please describe
I need to have a default value in some input fields, a value that will be filled automatically after I delete the value introduced manually. I tried to use the prefilled values, but they don't have this behavior. I did some tests and I saw that they are filled just once, after the update of the template in the diagram. If you change of it in the diagram, you won't be able to get back the default value. The modeler tries to keep the value introduced manually by the user.
There is also an exceptional case when the prefilled value is not updated in the diagram, even if you're using optional:
We decide to use the prefilled values for the hidden fields that can't be changed by the user.
Describe the solution you'd like
Describe alternatives you've considered
For now, as a workaround, we add notes and documentation links in the description of the fields.
Additional context
These custom templates have to be very user friendly so the placeholders will be a great feature in some cases.
The text was updated successfully, but these errors were encountered: