I was trying to figure out how I would be able to use modx manager’s js to get the field value for price tv and auto fill a price inc VAT tv field?
Any suggestions greatly appreciated - thanks...
-
☆ A M B ☆
- 2,475 Posts
That sounds like the job for a plugin. You’d have to calculate that value using PHP that was triggered at the appropriate event. I wouldn’t use JS for that, personally.
Something like using the "OnDocFormRender" event for the plug in?
So how would I get the value into the manager doc tv field would it be a case of using the @SELECT somehow?
thanks Everett...
-
☆ A M B ☆
- 2,475 Posts
You may have to play around with which event to use... I don’t know off the top of my head, but if you use some testing code that does a simple print statement, you should be able to figure out which event(s) you can use.
As for getting the value... if you’re using a @SELECT binding, you may have to recreate that query using the db api.
If you wanted to do this with javascript, you could try using the JQuery populate plugin...