-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Forms and popups - role="fieldcontain" and popup-appending #5780
Comments
What doesn't work about the field container in the popup? I see your point about a popup that is part of a form. If it's the only form on the page you can make the page itself the form ( @gabrielschulhof - You were working on making it possible to have a popup outside a page. Do you think this will also change where we add the popup container in the markup? |
Hi, yes it would be possible to wrap the whole page in the form but unfortunately it would be a pretty "ugly" way to do so, because we are using symfony and dont want to modify the main "template" just because of this "bug".. A field container should float the label left of the input field and change the width of the input field if there is enough space for that. In a popup it does none of that - it just looks like there wouldnt be a field container around it in any way. I guess both problems could be fixed by not moving the contents of my popups to an other place in the markup and just let it where I set it in the HTML ;) |
The field container issue as you describe it has not to do with moving the popup contents, but is something we do on purpose. |
Related: #5946 (comment) |
@Pfilop I believe you can solve the button-outside-the-form problem by giving the form an ID, and referring to the form via the button's <form id="the-form">
...
</form>
...
<button form="the-form">Submit</button> Note though that, in the case of a submit button inside a popup, there's a bug for which the fix will land in 1.5.0. |
Hi.
A div with data-role="fieldcontain" doesnt work inside a popup.
You can see an example here: http://jsfiddle.net/B3pyG/
Also jQM is appending all the popup-containers at the end of the role="page" no matter where its placed in the HTML.
When you have a big form and some of its fields inside a popup, these fields will be moved and are no longer inside the form itself, so you cant read the values anymore and are forced to move them again, before the form submit.
Thanks
The text was updated successfully, but these errors were encountered: