JS in automatic action form

Ask your questions here.
Post Reply
karahan
Posts: 227
Joined: 09 Jul 2021, 22:14
Name: Edin Karajić
Location: Bosnia and Herzegovina
Company Name: KARAHAN d.o.o.
Contact:

JS in automatic action form

Post by karahan »

Hi,

I have two date fields in automatic action form and I want to use javascript to calculate difference in the third numeric field.
Anyone has idea how to perform that?

The "add javascript" in entity configuration seems not to work for modal windows...

Thanks.
antevasin
Posts: 121
Joined: 24 Mar 2020, 08:57
Name: Spencer Crocker
Location: Corby, UK
Company Name: Unicloud
Contact:

Re: JS in automatic action form

Post by antevasin »

You need to add the javascript on the auto action JS not the entity. Why are you wanting the difference in dates in a numeric field? How should the difference be displayed? As minutes or hours etc...
karahan
Posts: 227
Joined: 09 Jul 2021, 22:14
Name: Edin Karajić
Location: Bosnia and Herzegovina
Company Name: KARAHAN d.o.o.
Contact:

Re: JS in automatic action form

Post by karahan »

Yes, you are right!
I needed to add javascript code in the action itself, not in the entity.
Your guide solved my problem. Thanks a lot!
Post Reply