Jump to content

Recommended Posts

I'm trying to insert the default message "Not Required" into the text field of a form, in a table.  Once all fields validate, the next page contains a table with all the input for the user to verify before submitting to the database.  My goal is to have the table on the verification page not contain empty cells, but to have the field that was not completed to submit "Not Required" to this cell and give the page a finished "pretty" look.  I have done the same thing successfully with a textarea, but the text field is not displaying my default message within the field, but rather to the right of the field.  I cannot seem to get the default message into this text field, which leaves the cell in the verification table very "ugly".  Any help on how to do this successfully with the text field?

 

What is not working:

     <td colspan="2" class="labelcell"><label for="subject_address2">Address (Line 2)</label></td>
     <td colspan="2" class="fieldcell"><input type="text" name="subject_address2" size="40" tabindex="4" value="<?php echo stripslashes($usrAddress2); ?>" />(Not Required)</td>

 

What is working:

     <td colspan="2" class="smalllabelcell"><label for="repairs_needed">Repairs Needed?</label></td>
     <td colspan="2" class="smallfieldcell"><textarea rows="10" cols="40" type="text" tabindex="13" name="repairs_needed" value="<?php echo stripslashes($usrRepairsNeeded); ?>">(Not Required)</textarea></td>

Link to comment
https://forums.phpfreaks.com/topic/155310-solved-quick-form-question/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.