Form input does not change

Hello. I am trying to create app for creating and modifying business vars (something like simple registry) and i have problem with modifying data in inputs.

I have 2 processes - first for creating, second for modifying business vars.

The problem is in second one:
Edit process

So here i have list of all existing entries:
Country List
, when i press second button i take persistanceId of the record and pass it to my second (record edit) page.
custom url

In this second page i take record entry by its persistance id, fill inputForm JSON variable with it and bind my form inputs with it data.
Second page

Javascript for filling JSON inputForm variable:

$data.formInput.newName = $data.country[0].name
$data.formInput.newAlpha = $data.country[0].alpha2Code
$data.formInput.contryId = $data.countryId
return "hello";

And my idea is to call instantiation of edit process, and modify business variable with inputed data. The problem is - i cant modify my inputs.

I’ve tried everything - but if i bind my inputs with JSON variable with existing business variable data - i just cand type there anything. Nothing helps -
inputs does not change

So the main question is - what can i do to fix it.

The second question is (it is not referenced to main problem) - can i somehow add custom event listeners for page elements (for example - perform some action just before onclick event for submit button) and if i cant - how to do it?

UPD:
I tried to create instantiation form for edit process via bonita bpm studio (in Execution tab of my process pool) and faced pretty much the same problem:
UI designer

I get record by its persistance id by external api variable:

`../API/bdm/businessData/com.company.model.Country?q=findByPersistenceId&p=0&c=10&f=persistenceId={{countryId}}`

then set formInput values with it:

$data.formInput.newName = $data.country[0].name
$data.formInput.newAlpha = $data.country[0].alpha2Code
$data.formInput.contryId = $data.countryId
return "hello";

and after that i cant type anything in my form inputs. Still have no idea why and how to overcome this problem

Hi,

bumped into the same problem. It seems that setting the formInput in this way does not allow any further modification of the values from the UI.
A workaround would be to use the value property of the input field directly without using a variable. For example to set the input field of the newName with the value from $data.country[0].name, you should set its value property to $data.country[0].name. In that way the field gets the value $data.country[0].name as default value and you are still able to modify it from the UI. However, you will also have to modifiy the formOutput accordingly I presume.

Best