-
Notifications
You must be signed in to change notification settings - Fork 106
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
Close html tag immediatelly - add nested Form support #1275
Conversation
b48e264
to
4ff041f
Compare
a1027b8
to
d6934dc
Compare
@ibelar, @georgehristov, can you please help with this? What I have done:
but it seems to not work, the the content is not reloaded properly (compare vs. expected result on the demo above on develop) it seems like some atk issue. JQuery serialization seems to be working well with the linked (ie. not in subtree of <form>) controls... |
d6934dc
to
6e01c51
Compare
@mvorisek - I have taken a quick look at this. First: The HTML element set to fire the Fomantic api request is usually set to the form id. So form submit correctly but it is replacing content of the form, which in this PR has a display: none css property. You would need to adjust this line Form::class:
Probably replacing with the id selector where you want to replace content.
The other problem and I think this would be a major one, is the way Fomantic-UI is handling its form module. Especially when you need to display an error on a specific field. They have a namespace/selector mapping that you can set, but I never try and do not know if it will work. See https://fomantic-ui.com/behaviors/form.html#dom-settings I am afraid that even if you manage to adjust field selector, their search for input is limited to the enclosed form tag, i.e. search is done inside form, not outside. I have test manually in browser console and Fomantic throws error:
|
This was the issue - this means two things that were written together (not horibly bad, but I did not realized it, thanks)
It seems So current situation is:
@ibelar wdyt? |
d4fa73e
to
4d58f5d
Compare
22fff86
to
23b9c37
Compare
949da9f
to
51c7833
Compare
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.
LGTM
Nesting html
<form>
tags is not possible, hovewer they can be closed immediatelly and linked with the input controls/tags, see https://stackoverflow.com/questions/3430214/form-inside-a-form-is-that-alright#21900324Atk should support AST as much as possible, this is also how some React components cope with this html limitation.
forms spec: https://www.w3.org/TR/html52/sec-forms.html