Hi guys, it''s me again ;) is it possible to put forms into forms? My problem is, i have a form which gathers informations about an SSL Certificate order. There is a field which holds the SSL CSR file. Now i wanted to put in a subform which has an form_remote_tag and decodes that CSR file and returns if everything was okay or not. Now if i put in a submit_tag it submits my form which holds the ssl cert order instead of the subform which should only check for the correctness of the CSR :) I mean in PHP i''d assign the form a ''name'' or ''id'' and then do javascript: document.getElementByID(''subform'').submit() but that won''t work in rails since i can''t assign a name or id to a form :/ Any ideas for this? Thanks in advance -- Posted via http://www.ruby-forum.com/.
There''s no reason to nest the forms. Make them seperate and you should have no problems. If that won''t work, don''t use form_remote_tag. You''d have to make your own semi-form using Prototype that "submits" the file field when you click a button. Overall, it''d wouldn''t be pretty. -- Posted via http://www.ruby-forum.com/.
Franz Bettag wrote:> is it possible to put forms into forms? My problem is, i have a form > which gathers informations about an SSL Certificate order. There is a > field which holds the SSL CSR file. Now i wanted to put in a subform > which has an form_remote_tag and decodes that CSR file and returns if > everything was okay or not. > > Now if i put in a submit_tag it submits my form which holds the ssl cert > order instead of the subform which should only check for the correctness > of the CSR :)Instead use submit_to_remote and its :submit option, because this does not create an HTML form. -- We develop, watch us RoR, in numbers too big to ignore.
Html forms may not be nested. If you''re using form_tag, it''s second arg is a hash of attributes to add to the form tag. So, you can give it a name or an id attribute just fine (though the name attribute is deprecated in xhtml). b Franz Bettag wrote:> Hi guys, it''s me again ;) > > is it possible to put forms into forms? My problem is, i have a form > which gathers informations about an SSL Certificate order. There is a > field which holds the SSL CSR file. Now i wanted to put in a subform > which has an form_remote_tag and decodes that CSR file and returns if > everything was okay or not. > > Now if i put in a submit_tag it submits my form which holds the ssl cert > order instead of the subform which should only check for the correctness > of the CSR :) > > I mean in PHP i''d assign the form a ''name'' or ''id'' and then do > javascript: document.getElementByID(''subform'').submit() but that won''t > work in rails since i can''t assign a name or id to a form :/ > > Any ideas for this? Thanks in advance >
Mark Reginald James wrote:> Franz Bettag wrote: > >> is it possible to put forms into forms? My problem is, i have a form >> which gathers informations about an SSL Certificate order. There is a >> field which holds the SSL CSR file. Now i wanted to put in a subform >> which has an form_remote_tag and decodes that CSR file and returns if >> everything was okay or not. >> >> Now if i put in a submit_tag it submits my form which holds the ssl cert >> order instead of the subform which should only check for the correctness >> of the CSR :) > > Instead use submit_to_remote and its :submit option, because this does > not create an HTML form. > > -- > We develop, watch us RoR, in numbers too big to ignore.Well this is quite the solution i appreciate :) Mark, so it is not possible to do this like an subform (with multiple fields)? it''s just possible with single fields? :) Thanks to all. -- Posted via http://www.ruby-forum.com/.