This topic is locked

Help adding multiple fields to a form

12/3/2015 7:30:42 PM
PHPRunner General questions
M
mikeborschow author

I need help adding multiple fields to a form.
I am successful with adding just one using the instructions I found in the forum:

1. Add a custom input field to your form

<INPUT id=test type=text>
Make sure you specify field ID.
2. Add the following code to 'Javascript onload' event of the page where custom field was added
this.on('beforeSave', function(formObj, fieldControlsArr, pageObj){

var val = $("#test").val();

formObj.baseParams['test1'] = val;

});
3. In any event like BeforeRecordAdded or BeforeProcess use $_REQUEST["test"] to access custom field value.


But when I try to add another - I simply don't know how to modify the javascript onload code.
Anybody able to help me with this please?