-
-
Notifications
You must be signed in to change notification settings - Fork 17
Get form Id for validation context #56
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
Conversation
|
@harryadelb thank you for your contribution. It seems to fix an issue? Would you mind open an issue first which describes the problem and leaves room for discussion? I will take a look at it asap. |
|
Hello @jankapunkt I don't think an issue is needed. Basically the validation errors aren't showing up, try grabbing the code in the example and let's say upload a PDF file you would find out that the AutoForm error isn't showing up. It's pretty straight forward. |
|
Okay I checked and you are right: this.formId = this.data.atts.id;is not assigning the formId but the input id. However - I would rather propose to assign the correct formId in onCreated and keep the code in the event handler as before like ctx = AutoForm.getValidationContext(template.formId);I also would like to propose to use onCreated this.formId = AutoForm.getFormId();What do you think? |
jankapunkt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the official AutoForm api (AutoForm.getFormId()) and assign it in onCreated. I already tested it locally and it should work fine.
|
Great suggestion @jankapunkt! Ok, I added a new commit. Please recheck. |
jankapunkt
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
|
@dr-dimitru can you publish a new bumped version to the atmosphere registry, please? |
- 👨💻 Merge #56 Get form Id for validation context thanks @harryadelb and @jankapunkt - 📦 Update Atmosphere `ostrio:files` to `v1.13.0`, *was `v1.11.2`*
template.formIdreturns the file upload field id not the form id, but form id is a must for validation context to properly grab the form.