How to store HTML widget's data into process variable .
Hi kppatel, you can follow the following steps
Step 1: Create a HTML Widget and create a text input inside the HTML Widget with some ID (say "HTMLWidgetsTextField1")
Paste the following code in your HTML Widget
<html>
<body>Input Field of HTML Widget <input type="text" id="HTMLWidgetsTextField1"/> <br>
</body>
</html>
Step 2: Create a TextField in Bonita and let its ID be BonitasTextField1
Step 3: Create a Simple button (that does not submit the form). In "Options" > "HTML attributes" , paste the following code
$('#BonitasTextField1').find('.bonita_form_field').val(elem)"
This does the trick, now Run the Pool, Enter some data in HTML Widget and click the Simple Button, the data gets filled in Bonita's field. You can use hidden fields and store them into Bonita's variables as needed
We accessed "HTMLWidgetsTextField1" data through JavaScript, stored it in a variable called "elem" and set it into "BonitasTextField1" using jQuery
Hope this helps
Comments
hello , Thanks for reply and sorry for my delay . but i tried , i clicked on button but it do nothing .
what i mistaken ?