Accessing field value from form that is used in Subform Repeater
Hi everyone,
I am using the Subform Repeater Plugin, which is great for many many scenarios!
However, now I stumbled across an obstacle where a custom html field that tries to access a field value from another form field fails to retrieve the data when being used inside a subform repeater wrapper.
Usually I would use Javascript code like this in the form that is now used for the subform repeater:
var d1 ="status_new";var d2 ="status_current";//get valuesvar d1Val = $('[name='+d1+']:enabled').val();var d2Val = $('[name='+d2+']:enabled').val();
However, since the Subform Repeater creates multiple rows based on the same form, the field id seems to be changed dynamically to something like "12315342_step1_status_new", "2314422_step1_status_new" and so on (depending on the row).
Therefore the JS code above fails as it can't find "status_new".
Any suggestions how I can make that work with some JS magic, champs?
Cheers,
Eric