bigtoe
Posts: 115
|
| Posted: 12/29/2004, 6:58 PM |
|
I have created a record edit form "edit_a" using CCS.
This form contains 10 fields.
4 of these fields are required.
During data entry if the user does not enter data for
the required fields then he/she is reminded to do so
when the "Add" button is clicked.
While the reminder for the required fields is displayed,
the data just entered for any other fields in "edit_a" is
NOT lost (even though the "Add" operation is not yet
complete). So the user just has to provide the required
data to finish up.
All this works just fine.
Then I created another record edit form "edit_b" using CCS.
It contains 20 fields. Data entry for "edit_b" works just
like it does for "edit_a". All good so far.
For a field in "edit_b" I have setup:
Before Show-Retrieve Value for Control
Control Name: weight_in_lbs
Source Type: Expression
Source Name: CCGetParam("p2","")
This works too. When the page loads, the value associated
with p2 (in the URL) is assigned to the control "weight_in_lbs".
The control "weight_in_lbs" is a radiobutton.
It displays values 5, 6, 7 ... 14, 15
When "edit_b" is initially displayed, "weight_in_lbs" shows "9"
as the selected value because that is what it retrieved from
"p2". Ok, this is good. I then selected "7" and clicked on
the "Add" button.
I was then reminded that there were other fields on "edit_b"
that are required and I need to provide data for them. Ok,
this is good.
But I noticed that "weight_in_lbs" shows "9" as the selected value!
My updated "7" value for "weight_in_lbs" is gone and I
have to selected it again. Why/how is this happening?
This does not happen if I provide data for all the required fields
and other fields at the same time. So if there was no validation
reminder then the changed data is saved as part of the normal
"Add" operation.
How can I stop this repeated data entry when validation reminders are displayed?
I don't have this problem with the "edit_a" form where there is no
Before Show-Retrieve Value for Control
Thanks.
|
 |
 |
RonB
Posts: 228
|
| Posted: 01/09/2005, 7:40 AM |
|
I'm not sure i fully understand what is going on but you might try and make the retrieve value for controll conditional. put it in a if/else statement.
if ($grid->field->getvalue <> "somevalue)
{
retrieve value;
}
else do nothing
hope this helps?
|
 |
 |
|