This repository contains the final code for the Contact Us form tutorial on platformOS. This tutorial is designed to help you build a comprehensive Contact Us form, leveraging various platformOS features such as Commands, Validators, Events, data display, and logging.
The full tutorial is available on the platformOS documentation site.
To deploy the code to your own instance, follow these steps:
Ensure you have pos-cli installed globally. If not, you can install it using npm:
npm install -g @platformos/pos-clipos-cli env add --url https://YOUR-INSTANCE.staging.oregon.platform-os.com stagingDeploy the code to your instance:
pos-cli deploy stagingOr sync your changes:
pos-cli sync stagingThis repository is used in the Contact Us tutorial on the official platformOS documentation site.
Because the tutorial is written step by step, we provide checkpoints as Git tags. Each checkpoint matches the exact state of the codebase at the end of a chapter. This way you can check out only the part of the code that is relevant to the chapter you are following, without being confused by later changes.
checkpoint-defining-email— matches the result of Defining the email chaptercheckpoint-testing— matches the result of Testing the contact create command chaptercheckpoint-common-styling— matches the result of Styling the Form chapter
-
Clone this repository (if you haven’t already):
git clone https://github.com/Platform-OS/tutorials-contact-us.git cd tutorials-contact-us -
Make sure you have all tags:
git fetch --tags
-
Check out the tag that matches the chapter you are following, for example:
git checkout tags/checkpoint-testing
This puts your repository into the exact state of the code as it is shown in the documentation chapter. You’ll be in a detached HEAD state, which is normal for tags. If you want to experiment and make edits, create a branch from that state:
git switch -c my-experimentsTo return to the latest version of the code on main:
git checkout main
git pullIf you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.