Remmerie Bart wrote:
Have done it. See if I can remember. Add an action or submit widget to the row.I'm trying to generate an event when someone clicks a field in a repeater-row that returns me the selected row.
USE CASE: a list of items on the left side of your screen (maybe in a coplet), the details for the selected item on the right (eventually another coplet)
I've found two possible ways to go (but have not reached to goal with either one)
1. Starting by modifying the fields styling stylesheet, adding a "submit-on-click" option, which generates an on-click attribute => could not figure out where to go next...
2. Using form.js v3, where you can add an onActivate event to widgets
=> Could not get any output at all: does this work for textfields ?
Then, after the form is submitted, use something like form.getSubmitWidget().getParent() which will return you the Row that was selected. I imagine you'd do form.getSubmitWidget().getParent().getWidget("id") or some such to get an ID field for that row.
I belive CForms has changed a bit since I did this (and my memory isn't what it used to be) so the syntax might be wrong, but the idea is sound.
HTH.
Upayavira
Anyway, if I keep on trying for a couple of days, I'm sure I could struggle to a "workaround"-solution, but I was hoping someone else has "been there - done that" before me.
All hints are welcome! (I'm prepared to include a "show details" button on
every row)
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
