Jump to content

Generic Input = N/A


Matt Ridge

Recommended Posts

Ok, I am trying to make it so that the field itself shows a N/A in it instead of being blank.  So that a field does not remain blank.

 

The original code is:

 

echo '<div id="ncmrsr"><tr><td><span class="b">NCMR Supplier Response:<br /></span></td><textarea name="ncmrsr" rows="6" cols="85"></textarea></tr></div><br />';

 

I figured this would show the "N/A" in the field.

 

echo '<div id="ncmrsr"><tr><td><span class="b">NCMR Supplier Response:<br /></span></td><textarea name="ncmrsr" rows="6" cols="85" value="N/A"></textarea></tr></div><br />';

 

 

Since this doesn't seem to work, is there a way to make it so that if a field is left empty that "N/A" is the response in said field?

Link to comment
Share on other sites

The value for a <textarea>Goes here.</textarea>

 

Dang, thanks.  I think staring at code for 6+ hrs a day makes the simple mistakes blur together.

 

Is there a way to make it so that if it is left blank on its own that there is automatically an N/A put in there instead of leaving a blank field?

Link to comment
Share on other sites

If you have a value in the form field such as <textarea>N/A</textarea>, then the field isn't empty. If you want to use a default value in the database field you can do that, but I don't see what's wrong with leaving it empty.

 

Basically I want to make it so that no field is left empty. I know weird reason but I'm not the one that is requesting this. 

Link to comment
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.