Jens Schwarz wrote:
Hi,

I want to create a more complex element that seems (to me) like a radiogroup. 
But I can't get it to work.
That's the (not working) FormFu-YML-Code I have right now:
- type: Radiogroup
  name: complexelement
  options:
    - type: Date
      name: foo
    - type: Select
      name: bar
    - type: Text
      name: baz


It looks like what you want to have happen is that a field is only saved if the accompanying radio button is checked. I don't know how to accomplish this in FormFu, but you can do it with some Javascript. Just create a function that will blank out the other options when the radio button is pressed. If you want to do it using Javascript, I can try to write up the code for you.

You could also do it in CSS by hding the elements that are not selected. I have some code for this too, but it is a little complex to a CSS newb like me. I could show you my code for this type of solution.

This would be a very cool element to have in FormFu.

_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu

Reply via email to