Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
File name restriction
Annad
Hi,
Is there a way in which the name of a DCR can be validated before the DCR is actually saved.
For example in windows file system, a file cannot be renamed with a *, / , | and etc. However when a DCR is saved by clicking on the 'SaveAs' button,
the user is able to save the file with, for example, *.
Does anyone know how to prevent this from happening.
Thanks in advance.
Anna
Find more posts tagged with
Comments
Adam Stoller
I believe you can take care of it with FormAPI - however I don't know for sure as we explicitly disable the SaveAs option for my customer's templating implementation.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
JonathonG
Make use of the onSaveNameSpecified event in FormAPI. When you register a handler for this event, that handler gets passed the name the user typed in. You can then do whatever validation you would like. If the handler returns true, the save proceeds. If it returns false, the save is aborted - silently, so you probably want to provide an alert with some helpful error text.
See
http://YourTeamSiteServer/help/tst/formapi/formapi_18.html#SEC18
for more details.
Jonathon
Independent Interwoven Contractor
bboyle
FYI
FR 51395 is about having some control over acceptable filenames (not just DCRs, all files) in TeamSite.