Developer Center Blog » 18595

18595

[Public]

A Day in the Life... Hiding Form Elements

Posted Mar 04 2010, 08:12 PM by clewis

Filed under: , ,

Requirements:

Discuss

In this installment of A Day in the Life... we find that the past few weeks have been going pretty good for our developer friend. He has had time to catch up on other duties and to read up on some new Virtual Ticket features. Until one day:
Boss: "We have new temporary staff entering data into Virtual Ticket. They are having some trouble understanding what data is needed in some of the fields. The fields are labeled but that is not enough. Could you add brief descriptions to these fields to help the temp staff?"

Developer: "The form design is already pretty tight."

Boss: "Well you have to do something to address this issue."

Well the developer liked the current look of his forms. He did not want to clutter them up with paragraphs of instructions just to help some people that rarely use the system. He remembered reading about a new feature in Virtual Ticket that allows form elements to be hidden or shown as needed. This is done in MetaScript by setting the elements visibility property. He got to work developing a solution that included a popup bubble graphic and a text box.

Developer: "See, just click that  button and the help bubble pops up to give the user directions."
Screenshot of Virtual Ticket Form with a Help Button Screenshot of a Virtual Ticket Form with a popup help bubble displayed.

Boss: "Boy, I like that. Hey you know, I have always hated the way you have us going to another form just to send an email. Can you do something like this popup to create emails?"

Well the boss beat him to the next step in his plan. Yes, he could use this same technique to collect email information in a popup, and in fact, that was next on his list to do. He understands that he can control the visibility of all types form elements. It took a little bit of work to script all of the elements needed, but when he got it done is was really pretty neat.  To get you started, we've created an example in Toolbox Snippet 18593: Create an Email Popup
A popup email editor is used to write and send emails from within the Virtual Ticket form.

Boss: "That looks great! I'm glad I thought of it. I gotta go show the VP..."

Wanting to stay ahead of his boss, the developer came up with another application for this feature. His form had only enough room for a single cell file collector, but this collector usually held many images. The users always had to scroll through one image at a time in order to see them all.

He thought about it and realized that this would be another opportunity to use this new visibility feature. So he placed a  button in the corner of the current single cell collector. Clicking this  button toggled the visibility of a twelve cell file collector. This twelve cell collector was positioned directly over the single cell file collector. He then placed a  button in the corner of the larger collector. Clicking this  button would hide the larger collector. 
We've provided an example of this in Toolbox Snippet 18596: Create Expandable File Collector

He showed his solution to his boss and his boss loved it. He couldn’t stop clicking the buttons to expand and shrink the file collector window.
A standard one column file collector in a Virtual Ticket form. A multi-column file collector popped-up over a Virtual Ticket form containing a single column file collector.

Boss: "Now this is great! Can we still drag images into this larger collector?"

Developer: "Yes, this larger collector retains all of the standard functionality."

Later that day, the boss is overheard telling the VP what a great job the developer did on the new Virtual Ticket features.

So it turned out to be another great week; got a lot accomplished, learned some new tricks in Virtual Ticket, and got some recognition for his efforts.