[Seaside] triggerFormElement: and checkboxes?

Lukas Renggli renggli at gmail.com
Wed Aug 23 09:53:25 UTC 2006


> Last week you said that the best approach to solving my problem with
> submit buttons and updaters is to add a slightly different method to
> FormElement that only serializes the input elements and that is
> internally used by
> #triggerForm. I really do not know how to do this. Will please just give
> a couple of pointers?

Ok, try adding the following patch to SULibrary. I haven't tested it,
but it should work. Maybe you can confirm that?

SULibrary>>ySubmitButtonPatch
	^ 'Form.Element.Serializers.input = function(element) {
    switch (element.type.toLowerCase()) {
      case ''submit'':
        return false; /* ignore submit buttons */
      case ''hidden'':
      case ''password'':
      case ''text'':
        return Form.Element.Serializers.textarea(element);
      case ''checkbox'':
      case ''radio'':
        return Form.Element.Serializers.inputSelector(element);
    }
    return false;
  }'

> Thanks for all the help!

Thanks for your posts!

Cheers,
Lukas

-- 
Lukas Renggli
http://www.lukas-renggli.ch


More information about the Seaside mailing list