Page 1 of 1

Alert Box

Posted: 04 Feb 2018
by May.AlFarsi
I have added a hyperlink to my form and onclick function that prompts an alert box
and I was wondering if there is a way to customize the styles of the alert box and add some check boxes on it ??

Re: Alert Box

Posted: 05 Feb 2018
by Nikita Kurguzov
Dear May,
Alert window comes from JavaScript command alert(), read more about it here - https://www.w3schools.com/jsref/met_win_alert.asp
Instead, you can use prompt() method to ask user for input - https://www.w3schools.com/jsref/met_win_prompt.asp

Re: Alert Box

Posted: 21 Feb 2018
by May.AlFarsi
is it possible to capture the prompt input and populate it to a SP field Value

Re: Alert Box

Posted: 21 Feb 2018
by Nikita Kurguzov
Dear May,
Yes, of course. Try code like this:

Code: Select all

var title = prompt("Please enter Title");

if (title != null) {
    fd.field('Title').value(title);
}