Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Inserting a "Save as" button

Avatar

Level 1

Hi there,

I would like to include a "Save as" button at the end of my form. Not sure what the javascript is for this. I have created the button, i'm in Script Editor and have selected "postSave", not sure what's next...

Thanks in advance for your reply.

Jenn

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Yes ...but the command is:

app.execMenuItem("SaveAs")

and make sure that you have set the language to Javascript (top right of the script editor).

Paul

View solution in original post

8 Replies

Avatar

Former Community Member

On the click event of that button you will want to add the code app.execMenuItem("SaveAs"). This will bring up the saveAs dialog and allow the user to choose the file to save the file under.

Paul

Avatar

Level 1

Thanks for the quick reply Paul. Forgive my ignorance but this program and the javascript is all very new to me.

Do I just paste "execMenuItem("SaveAs")" in the Script Editor box after select the Show option "click"?

Jenn

Avatar

Correct answer by
Former Community Member

Yes ...but the command is:

app.execMenuItem("SaveAs")

and make sure that you have set the language to Javascript (top right of the script editor).

Paul

Avatar

Level 1

Thank you so much Paul! Very helpful... Don't suppose you saw my other post about recipients being able to return forms anonymously? I've tried but cannot figure it out. Any help would be appreciated!

Thanks again!

Jenn

Avatar

Former Community Member

Not sure I follow what you are trying to do....can you elaborate?

Paul

Avatar

Level 1

I would like to send a form to some internal clients (all same email and network) and allow them to return the form anonymously. I know it can't be done via email obviously, but I did read I might be able to use my SharePoint site somehow? I see that people post these forms on their websites. So if I wanted to do this, how does a user complete a form and submit it this way? I know this may be a huge question, if you have any helpful links or tutorials this would be great to help get me started.

Thanks!

Jenn

Avatar

Former Community Member

They woudl have to have another means of getting the form back to you. You can provide a submit button where they can post the form back to a web server. A program woudl have to be written to recieve the form and do with it as you please. Another option would be to have a shared drive and simply copy/save the file into that folder or as you pointed out upload it to Sharepoint and use that as your shared folder. Note that the file will have the same name that you gave it so each user will have to create a unique name before it can be written to that shared loacation.

Does that make sense?

Paul

Avatar

Level 1

Thanks again Paul! I will look into it some more. Much appreciated!

Jenn

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----