<![CDATA[ What is the alternative to @EVAL binding? - MODX Community Forums]]> https://forums.modx.com/thread/?thread=104798 <![CDATA[What is the alternative to @EVAL binding?]]> https://forums.modx.com/thread/104798/what-is-the-alternative-to-eval-binding#dis-post-563569
EVAL binding will be deprecated when MODX 3.0 rolls out and since we are at MODX 2.7.0 my question is simple...what should I use now as the alternative to EVAL binding?]]>
random_noob Jan 14, 2019, 10:22 PM https://forums.modx.com/thread/104798/what-is-the-alternative-to-eval-binding#dis-post-563569
<![CDATA[Re: What is the alternative to @EVAL binding?]]> https://forums.modx.com/thread/104798/what-is-the-alternative-to-eval-binding#dis-post-563713
The only way the @EVAL could be used for mischief is by someone who is able to log into the Manager, and in that case, they could cause plenty of trouble without the bother of messing with that TV.
]]>
BobRay Jan 22, 2019, 02:46 AM https://forums.modx.com/thread/104798/what-is-the-alternative-to-eval-binding#dis-post-563713
<![CDATA[Re: What is the alternative to @EVAL binding?]]> https://forums.modx.com/thread/104798/what-is-the-alternative-to-eval-binding#dis-post-563706 Quote from: BobRay at Jan 16, 2019, 08:15 PM
Do you mean populating the TV in the Manager for Manager users, or populating it in the front end for regular users?

You might look at MIGX TVs.

Also, maybe an @SELECT or @FILE TV would do the job.
Yes I meant populating the TV in the manager for manager users. This is what I'm doing with the EVAL binding.

I have a parent resource (Departments) that has a MIGX TV which contains the departments' name within a company (IT,Accounts,HR, etc). The reason I'm using a MIGX TV is to allow the user to add/edit/remove a department as they wish.

The child resources are the employees and I have two TVs within them. The first TV is a listbox and it uses @EVAL binding to get the department names from the parent resources (Departments). The second TV is a MIGX TV and within that MIGX TV, I'm using another @EVAL binding to populate a multi-listbox with the values from the first TV.

I got the task done with @EVAL binding but I was wondering how I can achieve this without EVAL binding.]]>
random_noob Jan 21, 2019, 05:57 PM https://forums.modx.com/thread/104798/what-is-the-alternative-to-eval-binding#dis-post-563706
<![CDATA[Re: What is the alternative to @EVAL binding?]]> https://forums.modx.com/thread/104798/what-is-the-alternative-to-eval-binding#dis-post-563618
You might look at MIGX TVs.

Also, maybe an @SELECT or @FILE TV would do the job.]]>
BobRay Jan 16, 2019, 08:15 PM https://forums.modx.com/thread/104798/what-is-the-alternative-to-eval-binding#dis-post-563618
<![CDATA[Re: What is the alternative to @EVAL binding?]]> https://forums.modx.com/thread/104798/what-is-the-alternative-to-eval-binding#dis-post-563615 Quote from: BobRay at Jan 15, 2019, 10:50 PM
It's usually possible to replace an @eval binding with a regular text TV plus a very simple custom snippet containing the eval code.
Hey Bob, I do not quite understand your suggestion. What if I am trying to populate a listbox TV with values by using the @eval binding? Can you please clarify some more?]]>
random_noob Jan 16, 2019, 07:12 PM https://forums.modx.com/thread/104798/what-is-the-alternative-to-eval-binding#dis-post-563615
<![CDATA[Re: What is the alternative to @EVAL binding?]]> https://forums.modx.com/thread/104798/what-is-the-alternative-to-eval-binding#dis-post-563593 BobRay Jan 15, 2019, 10:50 PM https://forums.modx.com/thread/104798/what-is-the-alternative-to-eval-binding#dis-post-563593 <![CDATA[Re: What is the alternative to @EVAL binding?]]> https://forums.modx.com/thread/104798/what-is-the-alternative-to-eval-binding#dis-post-563570 That being said, there should be other ways of achieving the same goal without using eval.]]> muzzstick Jan 15, 2019, 02:25 AM https://forums.modx.com/thread/104798/what-is-the-alternative-to-eval-binding#dis-post-563570