On my website i use ACF and some addons (Advanced Custom Fields, Flexible Content Field, Gallery Field, Options Page and Repeater Field)
On my website, we show the cars of the compagny. But when a cars i sell, i want this kind of functionnality:
– The administrator go on the back-office, on the page of the vehicle, and on the first time he write the e-mail of the buyer and after he have 1 button “Send the first mail: “You order is ok”. The system send an e-mail with the informations of the vehicle to the email of the buyer.
– After, when whe have the date of delivery, we can send an e-mail again with “You car was ready the 19 of september for example)
– And a last e-mail “Thanks for your purchase”.
So, i know how to had the input to write the e-mail of the buyer and the date of delivery, but how to add button to ACF ?
I search a lot of solution but i dont find. I can use “Switch button” but if on the back office we had a switch “Send the first e-mail ?” and we say “YES”, we save the first mail was send, perfect. But if the administrator go again on the vehicle page to make some modifications and the button was still on “Send the first mail, YES” the buyer recieve again the email..
I hope to have been pretty clear to explain my problem..
Thanks you !
This is my take on the solution. Not saying it is the best, but I think what you want can be achieved with it. You could look into render_field (create_field in the non-pro version). You can add html to any field there.
You could create a form there with 3 buttons, which each have their own function and send a mail with wp_mail and hook it in the field you want it to show. Shouldn’t be too hard…
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users