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
https://forums.phpfreaks.com/topic/251204-generic-input-na/
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
https://forums.phpfreaks.com/topic/251204-generic-input-na/#findComment-1288417
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.

Link to comment
https://forums.phpfreaks.com/topic/251204-generic-input-na/#findComment-1288427
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
https://forums.phpfreaks.com/topic/251204-generic-input-na/#findComment-1288428
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.