What is the purpose/function of a button?

Discussions about Forms Designer for SharePoint 2013 / 2016 and Office 365.
Locked
MES5464
Posts: 94
Joined: Mon Aug 26, 2013

02 Oct 2013

What is the purpose of a button?

It does perform my code but it also seems to perform a post back.

Is it possible to have the button change a text field value, submit, and close the form?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

03 Oct 2013

Sure, to prevent an automatic postback, please, put the following code in OnClick property of your button:

Code: Select all

event.preventDefaults();
To submit the form by clicking your custom button use the following code:

Code: Select all

fd.save().click();

MES5464
Posts: 94
Joined: Mon Aug 26, 2013

03 Oct 2013

thank you

Locked
  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests