I need a row submit action, that allows a form to be submitted for a specific line in a repeater.

An example usecase would be on a selling site, you have a repeater showing purchasable items, each with a 'buy' button next to it.

Clicking on a row submit action will submit the form and allow the flowscript code that deals with the submitted form to gain access to either the repeater row object, or at least the row index that was clicked.

Is there anything like this already? Any of you interested in adding it ;-)

Now, I suspect that the RowAction widget wouldn't need too much work to make it into a 'SubmitRowAction'. But, I can't see in the code how the different behaviour of an ActionWidget from a SubmitWidget is accounted for in the code.

As to finding the widget that was submitted from Flowscript, I think what I would add a method to the repeater for 'getSubmittedRow()'. When you click submit, the repeater's 'submitted row' value is set to the current repeater row. Then, from flowscript, if your repeater is called 'contacts', and the repeater has a widget called 'name', you can say, contacts.selectedRow.name to get hold of the name value for that row.

Is this reasonable/correct?

I need it quickly, so if none of you are able to knock it up, I'll give it a go. But I'm still green when it comes to Woody coding, so I will probably need lots of help.

Thanks,

Upayavira


Reply via email to