Gallery
Wordpress + Coda Starter Kit
Share
Explore
Setup Guides

icon picker
3. Button Actions

Learn how to push data to Wordpress

Level: Medium

IMPORTANT: To continue you should have already confirmed your account is connected and the buttons work
The following guides are all now assuming you have connected using this copied Template. If you are not an experienced Coda user that understands formulas and how to decompile tables then working through this without a template may be rather challenging.
Our pack contains multiple buttons that trigger actions which in turn will allow data on our Wordpress site to be manipulated.
Our button actions are:
Create - This will create new records in Wordpress
Update - This will update existing records in Wordpress
Delete - This will delete existing records in Wordpress
By using these actions within our Coda tables, buttons, and formulas, we can start making our Doc a controller for our Wordpress site and speed up and manage tasks we would usually do from within the Wordpress dashboard.
IMPORTANT: When you add a new record using your action buttons you will need to your table to see the changes.

We will use the “Create Tag” button action as our example

This button is as simple as it gets. It allows you to add the “Name” field values directly from within the button settings by right clicking. This is the same as if we dragged over the button from our Pack building blocks.
Create Tag
(remember to change the values if you push it more than once or you’ll get a duplicate error.)
Right click the button to see the parameters. Click “Add More” to add more parameters (maybe wait till later for this option) and then when ready, click on the button to update the Tag table (view of table below)

Remember to once tag has been created so you can see your changes!

We will use the “Update Tag” button action as our example

This button allows you to update the Tag values from within the button settings. For “updating” to work we use the “tagID ” parameter to reference that tag you wish to update, which can be found in your under the column Tag ID.
Update tag
Right click the button to see the parameters. Add the Tag ID for the tag you wish to update and a new value in one of the fields you want to edit & update. Click “Add More” to add more parameters if you wish.
Remember to once tag has been created so you can see your changes!

We will use the “Delete Tag” button action as our example

This button allows you to delete the Tag values from within the button settings. For “deleting” to work we use the “tagID ” parameter to reference the tag you wish to delete, which can be found in your under the column Tag ID.
Delete tag
Right click the button to see the parameters. Add the Tag ID you wish to delete and a new value in one of the fields you want to edit and update. Click “Add More” to add more parameters.
Remember to once tag has been created so you can see your changes!
Create Tag
Here we have simple buttons that reference and add a row in a new Tag table we have built. You can build your own tables to allow for easy tag management from within Coda. Try creating a tag. Remember to sync back to Coda once tag has been created!
You will notice these are a little un-intuitive. Why not try another way!
If the below table is missing go to your own Sync table wherever it is located. your table to see the changes.
Re-sync Tags Table to see changes
4

Next Steps


Share
 
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.