Debbie,
I added the following and the date field works perfect.
case "pick_date":
$form .= "<td class=\"td_input_form\">".$select_type_select."<input type=\"text\" name=\"".$field_name_temp."\"";
if ($details_row[$field_name_temp] != "") {
$form .= " readonly=\"readonly\" style=\"font-weight:bold; border:0;\" tabindex=\"-1\"";
} //end if
I had to leave off the below portion because it caused the date field to be read only even if it had nothing in it or it was already populated.
|| ($details_row[$field_name_temp] != "0000-00-00") || ($details_row[$field_name_temp] != "0000-00-00 00:00:00")
I was also able to add the following to select_single and it worked as well.
if ($field_name_temp == "YOUR_FIELD_NAME") {
$form .= "<option value=\"".$var_for_current_user."\">".$var_for_current_user."</option>
<option value=\"ADDRESSEE\">ADDRESSEE</option>";
} else {
But the problem I have now with this select_single is this becomes the two choices for a record that has already been updated. So if something was received by someone else this will always want to overwrite it with the current user logged in. I didn't think of that before, so I may have to try something else.
Something else I also noticed which was there before any modification is the fields that I have set as required fields and have the asterisk(*) next to them are always there even if a record has been updated (not empty). Would you have any ideas on how to get the asterisk(*) to go away for fields that are no longer empty?
Oh and I was also able to get the calendar to not be shown once the field becomes "readonly" using
if ($details_row[$field_name_temp] == "") <- only shows the calendar if the date field is empty. I just did a reverse of what you suggested for the date field readonly.
Thanks for your help
Post Edited (10-27-09 23:16)