[ANSWER] Acces Checkbox in a html table (in form)

I have created a form with a HTML widget. In this HTML widget, I have writen a script to have a table with checkbox on it.
The problem is that I can’t acces to the value of the checkbox with my variable of my pool (boolean variable).

"""
Salles Cocher les demandes Personne ayant donné l'habilitation Visa du responsable de salle Accès salle programmé (FB)
106 toto titi tutu
106 toto titi tutu
106 toto titi tutu
"""

Picture of the result: http://www.hostingpics.net/viewer.php?id=2291452601.png

Which approach should be adopted? What I must do to access to the checkbox result?

Hello Sylvain,

As far as I have understood, you want to have the checkbox value (boolean) in one of your pool variables.
Pool variables are in the server side and your HTML code is on the client side. What you can do in such case is to define an event handler (using JS on your HTML code for example) that will do a REST API call to the server to assign a value to the process variable you want.

Here is the REST API documentation to build a data variable assignment request: http://documentation.bonitasoft.com/web-rest-api-examples-0#set_variables

Hope it helps

Pierrick

Where can I add the above code ?

Hi,

When you select your html widget in the form, go in “Data” and in the “Initial value” you can add the code (script). I hope it can help because I forget this solution. Now I use map on group widget.

I tried that but didn’t work (the above code) , if you have new solution could you share the steps with me.

Appreciate you help,

Thanks so much , it’s worked :slight_smile:

where i include above code and how proceed it.