Hi @beng56
Thank you so much for your kind words!
Yes, is completely possible to check empty values
Simply setup the filter condition as is “equal to” “” (leave blank the field, even do not the quotes because with the quotes AutomatorWP will thing that you are checking if X is equal to thos 2 double quotes)
For the “not empty” check will be a bit more difficult since the “contains” check need a value that exists inside the value and a empty value does not exists inside a value
Anyway, I just added your suggestion to add the empty/not empty options since its a excellent idea!
About the time, the date on logs are equal that the WordPress post date, if you place the mouse over the date you will be able to see the log time
Hope it helps!
Thread Starter
beng56
(@beng56)
Hi again,
Thanks for your reply. Indeed not setting the value works fine, my bad… And for the time, it does the job, thanks !
Looking deeper into my issue, I’ve found out it might be bigger.
Let me explain to you my automation (quite simple):
– trigger a form submit from forminator plugin
– update a post meta data IF this post data is empty.
Here you can find a screenshot : https://drive.google.com/file/d/1VqEgIMH9NMktW2lzFuZ97_NYI2-GPar7/view?usp=sharing
Let’s say that “comuna_postulation_1” has empty value at the beginning. What happens is that “comuna_postulation_1” has its value updated with user_meta thanks to automatorWP. This part works well.
But if I change the post meta value, the filter cannot get this value. I’ve tried as you see in the picture with post_meta but it doesn’t get the value, it always returns “” although it has a value. It’s weird because in the WordPress action part it manages to update the value for meta_key comuna_postulacion_1, so it means forminatorWP has access to it. How access it with the filter ?
What could cause the issue is that the form is included in a post template page and maybe he is lost between the post template page and the actual post where the user submit the form..
In the wordpress filter, I have access to user meta but not post meta so I have to use the flat condition.
Any idea in order to make it works ?
Thanks,
Benoit
-
This reply was modified 4 years, 10 months ago by
beng56.
Hi @beng56
Keep in mind that the post meta comes from the form configuration, not from the submitted data
For the forminator trigger you have the following tags:
1) form_field tag: To get any submitted value in the form
2) Post tags: To access to any information of the form, like its title, author, etc
So is possible that the post meta you are looking in the form does not exists
Hope it helps!
Thread Starter
beng56
(@beng56)
Hi,
I understand that, but in my action (before the filter), it manages to update this post data so AutomatorWP should also has access to it for filtering.
Here, forminator is only used for triggering the automation and getting the post ID, I’m not using forminator form field values to update post values.
I guess I can manage to do it with custom coding if no solution can be found here.
Thanks anyway for the support !
Benoit
Hi @beng56
But are you updating the post metas or the user metas?
You also mentioned that forminator is to get the post ID, if you are getting a different post ID you are not able to get this post meta, the post meta tag points to the forminator form (that is a post)
Thread Starter
beng56
(@beng56)
Hi,
I’m updating the post metas.
I understand what you mean and I better understand how it works.
Indeed, now I agree, at it is the filter cannot access to this meta data.
I will find another way by for example adding by coding a hidden field to forminator with the needed data.
You can close the topic.
Thanks for your help, I’ll give a 5 star rating π
Best,
Benoit
-
This reply was modified 4 years, 10 months ago by
beng56.
Great @beng56
I’m glad to hear that everything is clear to you.
Thank you very much for your review!
We really appreciate it
If you have any further questions, do not hesitate to contact us.