Maybe there is a way to do this or maybe this is a feature request for laserfiche...
Right now in the new Forms designer with the javascript function onFieldBlur onFieldChange does not return the index of the field when the field is in a table or a collection. Also I would be nice if we could retreive the value directly with this.val().
I am trying to convert one of my process that was build in the classic designer to the new forms designer and I had some javascript code in jquery that I am trying to adapt using the newLFForm javascript Interfaceshttps://doc.laserfiche.com/laserfiche.documentation/11/administration/en-us/Default.htm#../Subsystems/Forms/Content/Javascript-and-CSS/JavaScript-in-the-Forms-Designer.htm ).
I am trying to retreive the value of a field in a table that change and retreive a another field on the same row in that table and copy those two fields to another table in my form.
First I am trying to get the index of the field(find my row) so I can pass it to the getFieldValues(id,index) function to retreive the value of the field. But this information is missing and I have tried multiple thing without success:
LFForm.onFieldBlur(function (e) {
console.log(this); //log field
console.log(e); //log event
}, {fieldId: 285});//Field in my table
For the field I get only the field 285 without the index:
{
"fieldId": 285
}
The index is always null in the option in the event
{
"type": "event",
"eventName": "fieldBlur",
"options": [
{
"fieldId": 285,
"index": null
}
],
"id": 86,
"result": [
null
]
}
I have tried with a table and a collection... Tried different paremeters .settings.collectionId , .index, .settings.index....
Is there currently a way in Laserfiche Forms 11.0.2212.30907 to retreive the index of a field in a table when that field change?
OnBlur is nice but when selecteting a line with a click it is a bit unatural(user has to click in the field and out of the field. If I had an equivalent of on('click' that would be the best(another feature request).
Thanks