Hi Bob and everyone else!
I have a NewsPublisher form that is loading several select TV's that have strictly numerical options. Basically I want to take these and sum them up in to a "Total Amount" TV that is a standard numeric TV. I know I can do this easily with javascript, but can't get my head around the way NewsPublisher dynamically builds the form or where those templates even are. So a different and probably better approach would be in some way to use @eval as an input option on the total amount TV. This would have the added benefit of also working if I happen to edit the resource via the manager rather than NewsPublisher. Is this even possible? Am I off my rocker?
PS. Thanks Bob for creating such an awesome add-on!
K.
Using @eval in a front-end form is asking for trouble, security wise and it would be pretty involved @eval at that. I think your JavaScript idea is much better.
Just do a "View Source" on the form and you'll see the IDs for the TVs, then put the JS to do what you want in a file and include in the Template used for the NewsPublisher resource (the one with the NewsPublisher snippet tag.
Very slick solution.