Settings Mail values via JS
Hi Nikola,
I am trying to set some mail content via jQuery. Interestingly, some work like
ea_settings['submit.redirect'] = ''; // or give any value
but when I try
ea_settings['mail.pending'] = 'so and so';
It doesn't work. I do see an array when I view source and some settings are affected by JS and some aren't like this. Is there a way we can do this? I also check the filters but not sure how we can set it via filters depending upon what particular field is input.
Any guidance would be awesome.
Thanks,
Chandra
Chandra
Please login or Register to submit your answer
I see these on the source, if overwriting it doesn’t work, I am wondering what is it used for…
var ea_settings = {“mail.pending”:”pending”,”mail.canceled”:”canceled”,”mail.confirmed”:”confirmed”,”mail.admin”:””….
It would be great to overwrite this or have add_filter overwrite it with some logic. I am using different conditions in the form and sending a slightly different email depending on that form input.
Thanks,
Chandra
Hi Chandra, there is already filter for mail content.
Best regards,
Nikola
I saw that Nikola, I wanted to grab a field setting from ea_fields table and depending on that, I want to change the content of email. I am not sure how to do that.. something like doing get_post(id) for ea_fields. How are you doing that in the plugin?