Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Adding a custom action button to EditFormToolbar

  Asked By: Jamel    Date: Mar 19    Category: Sharepoint    Views: 3401

I'm creating a solution to deploy a list definition and to go along
with it, I need to add an extra button to the EditFormToolbar (and
the same one to the NewFormToolbar).
I've created a CustomAction feature which places the button
correctly, but the UrlAction does not seem to be working correctly
(or is different than I would be familiar with).
All examples I could find of this type of CustomAction use the
EditFormToolbar button to open a new page/application (aspx). Instead
I need to execute some JavaScript.

When I put JavaScript into the UrlAction tag of the element, the page
renders the link with something like href="javascript:__doPostBack()"
which reloads the page, though it does add my JavaScript to the
onClick method of the link. I've tried adding "return false;" to my
JavaScript to cancel the PostBack without luck.

Anyone have suggestions for going about solving this issue?

As a side issue, I'm deploying a JavaScript file which this button is
going to call a function in, but can't find a way to include it in
with the NewForm/EditForm without actually changing the form.aspx - I
was hoping to use some trick JavaScript to load it in with the
UrlAction, but clearly am having issues with any JavaScript in the



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Adding a custom action button to EditFormToolbar Or get search suggestion and latest updates.