I have several template variables with input type "text". The "Allow Blank" option is set to "Yes", I have triple checked.
My Problem:
In the manager in the edit template screen, if I clear the tv input field, save, and close that template, and then re-edit it, the tv field that I just cleared is repopulated with the default value.
This issue is not random for me and I can reproduce the problem over and over.
I'm not sure what I'm doing wrong but any help on this matter is appreciated. I would like to be able to override tv in a template with an empty value if I like, and not have to clear the field every time I want to edit and save a template.
Thank you.
well, default-value means use this value, if the TV is empty.
Am I misunderstanding the use of the "Allow Blank" option?
the "Allow Blank" is only for validation, if a value is requiered or not for this TV
If you want to have a default value and make it possible to have an empty value at the same time, I think it should be possible to fill it with a defined simple string and use an output-filter on that TV on the frontend, which replaces this string with an empty string.
Would this work?
Remove the default value from your TV and use a default value on the tag.
[[*MyLogoTV:default=`http://www.mysite.com/images/logo.png`]]
If the TV is empty in the resource it will display the default logo, otherwise it will use the one referenced in the TV for that resource.
I think it would be more clear if "Allow Blank" was changed to "Not Required".
DropboxUploader -- Upload files to a Dropbox account.
DIG -- Dynamic Image Generator
gus -- Google URL Shortener
makeQR -- Uses google chart api to make QR codes.
MODxTweeter -- Update your twitter status on publish.
but this would also allways show the url, if the TV is empty and you are still not able to set explizit an empty value.