Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Mandatory/Required Fields and Initial Directories
Shazzer
I am lamenting the loss of a few bog-standard Formspublisher abilities when developing LiveSite components- there is currently no capability out-of-the-box to set fields within your components as "required", and there is no capability to set a ceiling or initial directory on File datum types to point your users straight into the directory they need to browse.
I know the product was developed by a third party and I think the integration with TeamSite is actually extremely well done, but our content contributors, who are regular TeamSite FormsPublisher users, have asked us why we won't let them do this on LiveSite, because of course, they don't see the 2 porducts as essentially "different".
We'll be putting these in as feature requests, but has anyone done a hack to get around either of these issues in the meantime?
Find more posts tagged with
Comments
wscott
For a required field, we do have the idea of "min" and "max" on certain datum types, as well as default values within a component. For example, if you have a string datum that is required, you could give it min="1" and set the default value to something sensible. Then if the user tries to clear out the field, the component properties form will not validate. You can also put "(Required)" in the name of the field as a visual indicator, or maybe just put a *.
We're working on some improvements to the file datum and setting a ceiling or starting directory is one of the features we are looking at. I can't make any promises, though. The best workaround I can offer is to encourage the customer to organize their directories in an easy-to-navigate fashion.
Shazzer
That's quite useful - unforunately it is not documented, as I can't find any reference to min or max on datums in any LiveSite documentation. Could you please post the datums that can use it and the syntax or refer to somewhere that lists these elements?
Cheers Will!
wscott
Unfortunately this does not seem to be documented anywhere.
I wrote a post about it, here:
http://devnet.interwoven.com/forums_vb/showthread.php?t=17208
DateAsString.rptdesign
Shazzer
Thanks for that Will - I was looking for some way to enforce editors to edit a particular field, which these mins and maxes won't actually achieve, but it's useful to know that you can validate against user input in LiveSite - that will certainly come up at some point, I'm sure!
Shazzer
I should have mentioned that I do have default values in the fields I need edited, and our users have figured out that they can delete the default value and put in whitespace - without a regex to validate against 'em doing this, they get around it.
Still - until there is a way to set datums as required, as well as adding the ability to validate against the input a little more complex, your solution will tide us over, so cheers for that.
Shazzer
tec_iwov
There is also a mask attribute that you can use that takes a js compliant Regular expression.
wscott
Why are your users trying to subvert the components? If they don't want to fill in some of the fields, is there a way you can redesign the component to make those fields optional?
One other workaround, is to have the component render a detailed error if a required field is blank, whitespace, or nonsense-data. That way when a user adds the component to the page they will see the error instead of the component they were expecting.