I can not find a Form.setAnswer(…) function.
First of all, you need to download the new daily build which contains the latest modifications. FYI, the #addAnswer method was replaced by #setAnswer.
When the GUI renders the fields it would be easy to
bind GUI elements and form fields. Both are there in
place in the same loop. But because of the new submit
form the link is for the wrong form.
In the latest daily build you will find that the “new submit form” already contains ALL the FormFields that you need to fill out. This means that you can safely bind the UI to these FormFields.
You will probably want to iterate on the fields of the “original form” (which contains the labels, options, etc.) and:
Option 1: for each field you will have to send the Form.getField(String variable) method to the “new submit form” in order to get the FormField to bind to.
Option 2: for each field you will want to store the variable name and once you have the value to fill out the field you will use Form.setAnswer(String variable, …) to set the answer. Note: This option does not directly bind the UI to the FormField.