Default Values for fields not showing up
2 posts by 2 authors in: Forums > CMS Builder
Last Post: November 30, 2009 (RSS)
By bruno - November 30, 2009
I'm trying to add default text for a field. I have added a field within the section editor and set a default value:
http://brunellocreative.com/field-value.gif
When I try to edit the page within the CMS the default value does not appear:
http://brunellocreative.com/field-value-blank.gif
Any idea why this is happening?
Thanks
http://brunellocreative.com/field-value.gif
When I try to edit the page within the CMS the default value does not appear:
http://brunellocreative.com/field-value-blank.gif
Any idea why this is happening?
Thanks
Re: [bruno] Default Values for fields not showing up
By Chris - November 30, 2009
Hi bruno,
I'm afraid that default values only affect new records.
Depending on what you're trying to accomplish I can think of a couple of solutions for you: either adding some code to your viewer pages to display the default value if the field has no value -- or using the new MySQL Console plugin to update your existing records without a value in that field to have your new default.
Please let me know exactly what you're trying to accomplish and I'll see if I can come up with a solution for you.
I'm afraid that default values only affect new records.
Depending on what you're trying to accomplish I can think of a couple of solutions for you: either adding some code to your viewer pages to display the default value if the field has no value -- or using the new MySQL Console plugin to update your existing records without a value in that field to have your new default.
Please let me know exactly what you're trying to accomplish and I'll see if I can come up with a solution for you.
All the best,
Chris
Chris