Buy Now
Sign in

Edit Form and Double Dropdown

tshirley , December 06 2014

I have a data entry form working well, so I wanted to create an edit form, following a selection from a list.

I worked through the FAQ on creating an edit form that is called from a Chronoconnectivity V5 Connection. The connection model name is oprpt and I added this in the edit form for all field names (such as oprpt[field1], oprpt[field2])

Mostly, no problem - it went together well though there are a lot of steps. When selected, the data displays in the edit form and can be changed there.

Finally, all is working except the Double Dropdown that I have there:

DD1 is set to select Dynamic Data, in this case a list of Clubs and their account numbers. Works fine, and returns the account number

DD2 takes the account number and looks up the club president's email address.

This works in the entry form using the condition:

return array( 'IsPresident' , 'Acct_Nbr' => $form->data['Acct_Nbr']);

But not in the Edit form, where the condition reads:

return array( 'IsPresident' , 'Acct_Nbr' => $form->data['oprpt[Acct_Nbr]']);

The value oprpt[Acct_Nbr] is the field name for the field that is the first dropdown.

So, I guess this has to be coded differently, but I can't see what it should be. using the "oprpt[fieldname]" form works for all other fields.

One other question, what does the operator "=>" mean and is it different from "<=" ?