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)
add vf menu for user to create dropdown list
ela
Hi, I would like to add a custom menu to the visualformat toolbar, which allows the users to create a dropdown list (selection) in the textarea. They must be able to add the options themselves. Has anyone done something like this, and would you be willing to share experience, ideas, code?
I could easily add this option with separate text items outside the vf textarea and generate the necessary code with the pt, but it makes the form look a bit ugly.
I know how to add a custom menu to the vf toolbar, but the challenging part is how to add the correct functionality. I was trying to figure out how the other lists (bullets, numbers) are working, but couldn't find it.
Eldbjoerg
Find more posts tagged with
Comments
bboyle
I don't know the answer (sorry) but would also like to know how to customise VFE in this manner. Good opportunity for IWOV to publish some technotes with examples I think!
ela
I asked the same question in the Ektron forum, and there is actually a toolbar option for forms available in the Ektron software, but probably not in the Interwoven version, since I couldn't find it in the documentation provided by Interwoven. I'll ask Support about this, and come back with their answer.
So long,
Eldbjoerg
Adam Stoller
The documentation provided for VFE by Interwoven is apparently a subset of the Ektron documentation for the VFE product. I'd suggest deferring to the Ektron documentation and get both Interwoven and Ektron involved if you are running into problems with customization of the VFE.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
ela
GOT IT WORKING!!!
I asked IW Support, and got a link back where I could download an addon to my ewebeditpro version (2.6.0.7):
HOWTO: Add a Toolbar to Insert Form Elements (Addon)
I implemented everything as described, tested, found the buttons in my template, but they didn't do anything. I found a thread on DevNet which turned out to be very useful:
Visual format custom command
. I had to add the necessary funtion(s) directly in the ewebeditproevents.js file, and NOT in the customevents.js or ewebeditproeventsiw.js.Here's an example on what I added:
eWebEditProExecCommandHandlers["jsformselect"] = function(sEditorName, strCmdName, strTextData, lData)
{
var objFormCmd = formElementCommands[strCmdName];
showFormElementDialog(sEditorName, objFormCmd.sFormElement, objFormCmd.width, objFormCmd.height);
}
eWebEditProExecCommandHandlers["jsformcheckbox"] = function(sEditorName, strCmdName, strTextData, lData)
{
var objFormCmd = formElementCommands[strCmdName];
showFormElementDialog(sEditorName, objFormCmd.sFormElement, objFormCmd.width, objFormCmd.height);
}
function showFormElementDialog(sEditorName, sFormElement, width, height)
{
var sWindowFeatures = "scrollbars,resizable,width=" + width + ",height=" + height;
window.open(eWebEditProPath + 'formelementinsert.htm?editorName=' + escape(sEditorName) + '&formelement=' + escape(sFormElement), 'Form', sWindowFeatures);
}
var formElementCommands = new Array();
formElementCommands["jsformform"] = {sFormElement: "2", width: 450, height: 350};
formElementCommands["jsformbutton"] = {sFormElement: "9", width: 300, height: 200};
formElementCommands["jsformsubmit"] = {sFormElement: "0", width: 300, height: 200};
formElementCommands["jsformreset"] = {sFormElement: "1", width: 300, height: 200};
formElementCommands["jsformhidden"] = {sFormElement: "4", width: 300, height: 200};
formElementCommands["jsformtext"] = {sFormElement: "3", width: 300, height: 200};
formElementCommands["jsformpassword"] = {sFormElement: "8", width: 300, height: 200};
formElementCommands["jsformtextarea"] = {sFormElement: "5", width: 300, height: 200};
formElementCommands["jsformradio"] = {sFormElement: "6", width: 300, height: 200};
formElementCommands["jsformcheckbox"] = {sFormElement: "7", width: 300, height: 200};
formElementCommands["jsformselect"] = {sFormElement: "11", width: 350, height: 600};
formElementCommands["jsformfile"] = {sFormElement: "10", width: 300, height: 200};
And then simply add CommandHandlers for every function you want.
I'm happy!!!
Eldbjoerg