I've attempted to search this group for this particular issue, both
from within the Groups interface and Google itself, but I can't seem
to find what I need...so with luck, I'll get more success asking
directly here.

The issue is this: I have an "add" controller (model is Order), on
which I've attached a URL parameter--a single number.  Thus, the URL
is something like /sitevisit/orders/add/1.  This corresponds to adding
an order for the visit that is ID = 1.  So far, everything works
splendidly if I fill in the details correctly; in other words, if I
provide valid data.

Unfortunately, when I try to submit bad data (failing validation rules
like email, phone, or notempty), I lose that URL parameter--and the
form/view is no longer properly stocked.

How do I retain that parameter even on failed submission?

I tried this line (from some Google result I got):

echo $form->input('id', array('type' => 'hidden', 'value' => $visitInfo
['Visit']['id']));

which outputs this:

<input type="hidden" name="data[Order][id]" value="1" id="OrderId" />

but that doesn't seem to be what I want.  Plus, it's not really the
order ID; it's really the visit ID, and should only be in the URL.

Any thoughts?  I'm most appreciative of some timely help!

--Carl Anderson

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to