Handover from old forms
The process for switching to the React setsumeikai inquiry form/new general inquiry form.
Adding the setsumeikai form
Test page setup
You can skip this for switching over as it should already be set up, just notes for my future reference.
- Create a new page with the slug ‘book-appointment’
- Make a copy of the theme php template
page-entry.php
and rename the copy topage-book-appointment.php
. - Edit that renamed template to remove the iframe and replace it with
<div id="root"></div>
. - Use ReactPress to add the app to this new page.
Switching over
- Edit the
page-inquiry.php
template to remove the iframe and replace it with<div id="root"></div>
. - Trash the existing ‘entry’ page, freeing up its slug to be used by the new one.
- Change the slug of the test page to ‘entry’.
- Open it and verify the new form appeared.
- If something goes wrong, change the test slug back to ‘book-appointment’ then retrieve the old entry page from the trash.
Adding the general inquiry form
- Open the ‘page-inquiry.php’ template in the theme editor.
- Go to the Github repo and copy:
- the css file into a style tag before the form
- ONLY THE FORM from the HTML file to replace the current form
- The js file into a script tage under the form
- Update the file, then load the page to verify the new form is there and works.
GAS changes
Modify the ‘apiSet’ sheet in the drive to use the API endpoints from my site, rather than the old one.
api_get_kids_customer = https://kids-up.app/gas_inquiriesapi_kids_update = https://kids-up.app/gas_updateapi_kids_get_school = https://kids-up.app/gas_schools
Analytics changes
Apply my trigger on the 4 items Jack sent for the setsumeikai form, general inquiry one is fine as it redirects to the same place.