passing values when multiple fields by the same name

Status
Not open for further replies.

angie3742

New Member
Ok, I will try to make this as clear as possible. I have 3 html pages. The first one requires the user to select his/her name and tell us for which contracts to browse - those expiring in 15 days, 30 days or 60 days. Then they click on submit and those values are passed to the second form using get-value. The second page displays all the contracts based on the person who requested it and when they expire. Now, the trick is from there I want them to be able to click on a particular contract to update it. The second page displays a table with multiple rows - each row containing a contract #, price, cost and comments. When they decide which contract to update, they would click on that particular contract # (which has a hyperlink to the third page). The third page would display the chosen contract in detail - contract #, price, cost, expiration, comments, mfg contact, etc. BUT how does the third page know for which contract to pull the data? What I'm saying is I currently have get-value("contract") on the third page - BUT - the second page may have 20 fields by the name "contract". How do I code it to where only the selected row's information is passed along to the third page? I sure hope this makes sense. Thanks in advance for any input.
 

Jens

New Member
Two ways of doing this:
A hyperlink from each contract that looks something like
<A HREF="page3.w?contractid=333">333</A>. With 333 matching
every contracts id.

Then do like this in "page3.w"
iContractid = get-field("contractid").
FIND FIRST contract WHERE contract.contractid = contractid.

Or you cold use a form instead:
<FORM ACTION="page3.w">
<INPUT TYPE="radiobutton" NAME="contractid" VALUE="333">
<Info about contract 333>
<INPUT TYPE="radiobutton" NAME="contractid" VALUE="334">
<Info about contract 333>
<INPUT TYPE="radiobutton" NAME="contractid" VALUE="335">
<Info about contract 333>
</FORM>

Hope this might help you.

Regards Jens
 
Status
Not open for further replies.
Top