Jump to content

Archived

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

liquidg3

Return defualt value for field

Recommended Posts

So,

 

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

 

Thanx

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

×

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.