[Résolu] show field only if a year HASN'T passed from a date within another field
This support ticket is created Il y a 4 années et 8 mois. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
I have a view showing all orders, and in this view there's an "edit order" button for, well, editing the order 🙂
I need this button to be available only if:
1) there "today's date" text field isn't empty
AND
3) a year HASN'T passed after the order has been placed
What's the conditional I need to use for the editing button?
For the first condition, I'm using:
[wpv-conditional if="( $(wpcf-closing-order-date) ne '' )"][toolset-edit-post-link layout_slug='edit-order' target='self']<i class="far fa-edit"></i>[/toolset-edit-post-link][/wpv-conditional]
But what other conditional do I need to add for keeping this visible throughout a year after the order has been placed?
Note: Feel free to adjust the shortcode as needed and also add "show_edit_button" in the "Third-party shortcode arguments" section, at WP Admin -> Toolset -> Settings -> Front-end Content.
After that, you'll be able to use it in the conditional code block, like this:
[wpv-conditional if="( '[show_edit_button]' eq 'yes' )"]
Show Button!!!
[/wpv-conditional]
I hope this helps and please let me know if you need any further assistance around this.