Hi Afam,This works for me. It gives me "john" in the other field if it inscribe "charles" in the field firstname , "morris" for "susan", "michaels" for "tim" and nothing for any other value. Is it not what you are expecting?
This can be achieved by writing an expression like this.value = (TextField1.value ==1) * 2 . However if your case is so complex that you cannot derive an expression relating the fields then you can write a service, make an ajax call to it passing the value of TextField1, and return desired value ...
mandeep gandhi wrote... Yes we do support change event. Attaching a sample XDP with your use case. Also if you are not able to resolve the issue, then can you share the sample you created. I hope this would help https://helpx.adobe.com/livecycle/help/mobile-forms/scripting-support.html
jQuery uses val() API and there is no value API in jQuery. Even if this workd this would be a hack. I would like to suggest few ways - a. If the no of fields to prefill are in good in number then go with technique mentioned in "Setting Data attribute in stringReuest" section.b In case of less field...
Are you trying to pre fill form with this data? If yes then this is independent of the metadata associated with the form. So meta data won't be prefilled on form render. What you need to do prefill, please follow https://helpx.adobe.com/aem-forms/6/prepopulate-adaptive-form-fields.html