Twitter Feed

Xataface Maillist

Sign up to receive the Xataface news letter with weekly updates and development tips.

 

How to build submission forms using Xataface

A submission form (a form for users to submit information into a database) is a very common use-case for Xataface. This tutorial teaches you how to do it the right way.

Contents

1. Getting Started
So you want to build a submission form ...
2. Step 1: Create a table to store the submissions
The submissions table should have a columns corresponding to each field of the form.
3. Step 2: Decorating the form
Use the fields.ini file to assign the appropriate labels, descriptions, and widgets to the fields of your form.
4. Step 3: Adding Permissions
In order to allow the public to use your submission form (insert new records) but not edit, browse, and delete existing records you need to define some permissions.
5. Step 4: Adding instructions
Submission forms generally have some instructions at the top of the page to tell the user what the form is for, etc..
6. Creating a custom success page
Usually web forms will send the user to a success page with further instructions after the form is submitted.
7. Disabling unnecessary features
The submission form still has a lot of extra buttons to click on (the details, list, and find tabs), and other distracting features (e.g. the search form) that need to be disabled.
8. Appendix 1: Download the source code
Download the source code tarball for this application
Powered by Xataface
(c) 2005-2022 All rights reserved