Jump to content


Photo

Return defualt value for field


  • Please log in to reply
2 replies to this topic

#1 liquidg3

liquidg3
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 17 August 2003 - 04:50 PM

So,

Users can create their own fields, and set their own default value for each. So, how can i output the default value?

Thanx

#2 akitchin

akitchin
  • Staff Alumni
  • Advanced Member
  • 2,516 posts
  • LocationCalgary, AB, Canada

Posted 18 August 2003 - 01:44 AM

i dont know how you have them stored, but to output certain values as defaults in various fields it would be:

echo "<input type="text" value="".$defaultvalue."" />";echo "<textarea rows="5" cols="50">".$defaultvalue."</textarea>";

as long as the values you wish to set as defaults are in the $defaultvalue variable

#3 liquidg3

liquidg3
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 18 August 2003 - 01:52 AM

For example... i have a field called Type. here is where i put the type of account someone has. In the database the default value is Basic. I am going to be changing the default, so how can i output the default value, which for now would be Basic. But if i change it to Advanced, I want it to show output Advanced. Thank You.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users