[Seaside] Re: Triggerring save / submit of another form

Paul DeBruicker pdebruic at gmail.com
Tue Mar 10 20:14:11 UTC 2015


You could prevent the default action of the submit button and then use
javascript to serialize the forms.  


Look at the  JQAjax>>#serializeForm: message.  I don't know how/whether it
would work with multiple forms but I'd guess it would work fine if you gave
every form you wanted to serialize the same class and did a


html button
    bePush
    onClick:(html jQuery ajax serializeForm:(html jQuery class:
'myFormCssClass');
    with:'submit all forms'.




Another approach would be to serialize the form inputs when the user changes
them by adding an onChange: method to the input.  Then when they click any
of the buttons determine what processing & view updating needs to be done
based on what changed and do it.


Another approach might be to make it all one form, remove the intermediate
buttons, and just have the one button and the big form that's broken up
visually how you have the multiple forms now.  Whats the point of 7 forms
when its really just 1 sometimes?


Hope this helps






Sanjay Minni wrote
> Well it may be logical but at this time I am looking for a solution /
> workaround
> 
> ---
> Sanjay Minni
> +91 9900 902902
> On 10 Mar 2015 22:04, "Sven Van Caekenberghe-2 [via Smalltalk]" <

> ml-node+s1294792n4811067h81 at .nabble

>> wrote:
> 
>> if you use multiple, the contents of the others is lost, very
>> logical/normal
>>
>> > On 10 Mar 2015, at 17:23, Sanjay Minni <[hidden email]
>> &lt;http:///user/SendEmail.jtp?type=node&amp;node=4811067&amp;i=0&gt;>
>> wrote:
>> >
>> >>
>> >> From book.seaside.st section 10.2 end ...
>> >
>> > I assumed this meant that there can be multiple forms on a page
>> >
>> > "[...],.  Typically only a single form tag is needed on a page. form
>> tags
>> > must not be nested but multiple form tags can occur, one after another,
>> on a
>> > single page. Only the contents of a single form will be submitted by
>> the
>> web
>> > browser though (normally determined by the form in which the user
>> clicked a
>> > submit button)."
>> >
>> > regards
>> > Sanjay
>> >
>> >
>> > Sven Van Caekenberghe-2 wrote
>> >> I believe there can only be one form on a page.
>> >>
>> >> This is discussed in the main book.
>> >>
>> >>> On 10 Mar 2015, at 17:10, Sanjay Minni &lt;
>> >
>> >> sm@
>> >
>> >> &gt; wrote:
>> >>>
>> >>> Hi
>> >>>
>> >>> I thought this problem must already have a solution ... fairly
>> >>> commonplace
>> >>>
>> >>> in a screen with multiple form areas - say master/detail or matrix
>> like -
>> >>> if
>> >>> the user moves between areas and clicks a submitButton attached to a
>> form
>> >>> then there is some data / state loss in the other form - so how can
>> that
>> >>> be
>> >>> saved
>> >>>
>> >>> also somewhat related - How can i trap the event lose focus or when i
>> >>> move
>> >>> out of a field
>> >>>
>> >>> regards
>> >>> Sanjay
>> >>>
>> >>>
>> >>>
>> >>> Sanjay Minni wrote
>> >>>> Hi,
>> >>>>
>> >>>> How can save data in a form other than the one in which the
>> submitbutton
>> >>>> is clicked ?
>> >>>>
>> >>>> the page on www.uxfin.com contains 3 separate forms (separated by
>> >>>> horizontal rules). Users may typically leave midway while entering
>> data
>> >>>> in
>> >>>> the top form and click a submit button on any of the 2 lower forms.
>> At
>> >>>> that time the last value entered is not captured.
>> >>>>
>> >>>> How can I force this programmatically
>> >>>>
>> >>>> Thanks
>> >>>> Sanjay
>> >>>
>> >>>
>> >>>
>> >>>
>> >>>
>> >>> -----
>> >>> ---
>> >>> Regards, Sanjay
>> >>> --
>> >>> View this message in context:
>> >>>
>> http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811056.html
>> >>> Sent from the Seaside General mailing list archive at Nabble.com.
>> >>> _______________________________________________
>> >>> seaside mailing list
>> >>>
>> >
>> >> seaside at .squeakfoundation
>> >
>> >>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >>
>> >> _______________________________________________
>> >> seaside mailing list
>> >
>> >> seaside at .squeakfoundation
>> >
>> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>> >
>> >
>> >
>> >
>> >
>> > -----
>> > ---
>> > Regards, Sanjay
>> > --
>> > View this message in context:
>> http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811063.html
>> > Sent from the Seaside General mailing list archive at Nabble.com.
>> > _______________________________________________
>> > seaside mailing list
>> > [hidden email]
>> &lt;http:///user/SendEmail.jtp?type=node&amp;node=4811067&amp;i=1&gt;
>> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>> _______________________________________________
>> seaside mailing list
>> [hidden email]
>> &lt;http:///user/SendEmail.jtp?type=node&amp;node=4811067&amp;i=2&gt;
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811067.html
>>  To unsubscribe from Triggerring save / submit of another form, click
>> here
>> &lt;http://forum.world.st/template/NamlServlet.jtp?macro=unsubscribe_by_code&amp;node=4810872&amp;code=c21AcGxhbmFnZS5jb218NDgxMDg3MnwtMTY0MTAzMTYyMw==&gt;
>> .
>> NAML
>> &lt;http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml&gt;
>>





--
View this message in context: http://forum.world.st/Triggerring-save-submit-of-another-form-tp4810872p4811110.html
Sent from the Seaside General mailing list archive at Nabble.com.


More information about the seaside mailing list