Hi,
Actually , i have 3 forms,
form1 has unique company names.
If i click company name from form1, it will open another form ,(form2) to "add sales records"
for that company.In this form2 , i have more than 15 elements(text box, combo box, text area),
the user needs to fill out.The end user based on each step they will fill out certain
fields and not all.For example, if the user select step #1, they have to fill only 5 fields,
and hit the submit button. At later date(after a week, month or so), they will log on and
click the same company name and select another step,(ie,step #2) and fill only those required
fields say (2 fields).Just like that they have to fill the form and hit the submit button.
My question is, how i can show the already entered values as readonly format, so that they can
know which step do they need to enter or proceed with.So i would like to have the form,
with values that already entered as readonly and show the empty textbox to get input for other
steps.
My code is below:
<td ><B>Client Name:</B></td>
<td><?php print $contact_company; ?><INPUT TYPE="hidden" NAME="clientname" VALUE="<?php print $contact_company; ?>" SIZE="25" CLASS="text"></td>
</TR>
<INPUT TYPE="hidden" NAME="pro_list" VALUE="<?php print $list_id; ?>"
<td align="right"><b>Contact:</b></td>
<td><INPUT TYPE="text" name="contactname" VALUE="<?php print $contactname; ?>" SIZE="25" id="contactname" CLASS="text" tabindex="19"></td>
</TR>
<input type=hidden name="list_id" value="<?php print $_GET[update]; ?>">
.
.
.
<td ><b>Address:</b></td>
<td rowspan="4"><textarea cols="20" rows="4" name="contactaddress" class="text" tabindex="21"><?php print $contactaddress; ?></textarea></td>
</tr>
<td align="right"><b>Lead Source:</b></td>
<?php
$leads = mysql_query("SELECT sperson FROM leadperson WHERE lead_id=$LeadPerson");
$leadsrow = mysql_fetch_array($leads);
extract($leadsrow);
print "<td>\n<select name=\"LeadPerson\" id=\"LeadPerson\" size=\"1\" class=\"text\" tabindex=\"4\"\n";
$leadsql = mysql_query("SELECT * FROM leadperson WHERE leadstatus='0' ORDER BY sperson");
print "<option value=\"\" SELECTED> </option>\n";
while ($leadrow = mysql_fetch_array($leadsql)) {
extract($leadrow);
print "<option value=\"$lead_id\">$sperson</option>\n";
}
print "</select>\n</td>\n";
?>
<TD ALIGN="RIGHT"><B>Current Step:</B></TD>
<?php
print "<td colspan=\"3\">\n";
?>
<input type="hidden" name="db" value="<?php print $db; ?>">
<select name="step" size="1" class="text" >\n";
<?php
$selectThis = 0;
$stepssql = mysql_query("SELECT * FROM steps");
while ($stepsrow = mysql_fetch_array($stepssql)) {
extract($stepsrow);
if ($selectThis == 0){
print "<option value=\"$step_id\" SELECTED>#$step_id $description</option>\n";
$selectThis = 1;
}
else{
print "<option value=\"$step_id\">#$step_id $description</option>\n";
}
}
print "</select>\n</td>\n";
?>
<INPUT TYPE="submit" NAME="submit" VALUE="Add Sales Record" CLASS="button">
if i press submit button only those values entered will be stored in db. and another form
will be opened showing the data entered currently and having another button to Add sales record.
Currently the values are displayed in text box, and which is in editable format.I could not
able to retrieve values in combo box.when the user enters this form they should see both the
entered values and the empty text box to enter values.
How can i accomplish this.Could you please help me out of that.