Welcome Guest, Not a member yet? Register   Sign In
Edit, validate, re-edit issue using set_value with optional parameter
#19

[eluser]billmce[/eluser]
Ahhh ... we got it. Thanks to Ben and Brennan McEachran.

The crux of the problem is that set_value expects that both of the values passed to it have some value.

On the second pass, after validation failure, there is no value in the variables because I only got the data once .. the first pass when I actually need it to populate the view.

As Ben and Brennan noticed ... I had to re-retrieve the data on the 2nd and subsequent passes (even though I'm not going to use it) in order to keep set_value happy.

So, with the addition of a hidden value on the form to keep track of the $UniqContactID that was originally passed to the function -- on all subsequent iterations set_value has values in both
'Company' and $Company and behaves as advertised.

I'd suggest that set_values optional parameter behave differently ... but hey, it's now working.

Thanks Ben and Brennan ... I can feel my headache slowly subsiding.


Messages In This Thread
Edit, validate, re-edit issue using set_value with optional parameter - by El Forum - 03-19-2010, 12:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB