Not applicable

How to get HTML element values from Rich Text in Nintex forms?

Jump to solution

Hello there,

I have a requirement where I need to create a dynamic table (using HTML) inside a Rich Text control in Nintex form. But before going into the end product, I wanted to clear my understanding of Nintex form manipulations using jQuery. Seeking your help in a simple task now -

Objective

Display the value of a div element as a alert box message onclick of a button.

Steps:

Here are the steps which I've performed.

(1) I've created a Rich Text control and a custom save button

1a.PNG

(2) I double click on the Rich Text and set the html as below. Please note that the id of div is "markDiv". My requirement is to display the text inside this div as an alert, on the click of the button "Custom"

2.PNG

(3). In the settings of the button, I call the function DisplayMessage()

(4). In the settings of Nintex forms, I write my code as below:

          function DisplayMessage(){
                    //alert('Test');
                    var abc = NWF$('#'+markDiv).val(); 
                    alert(abc);
           }    

3.PNG

It works absolutely fine with the alert('Test') part, but after that nothing happens. Please suggest any inputs here, as this is my only stop-block here.

Tags (3)
0 Kudos
Reply
1 Reply
emha
Automation Master
Automation Master

Re: How to get HTML element values from Rich Text in Nintex forms?

Jump to solution

you should use the construct NWF$('#'+markDiv)  if you referenced a control that had set 'javascript variable' to 'markDiv'.

since you just add an id to HTML element (ie. didn't defined a variable) you have to use  NWF$("#markDiv")

View solution in original post

Reply