API 开发指南
遇到问题了吗?不用担心,答案都在这。
全站搜索

Creating entries with custom HTML forms

If you just need to create your own HTML form to save data to Ragic, you don't need to write any API code to do that. Ragic has a very simple way for your form data to be posted to Ragic.

Suppose you want to create a form that saves entry in this sample pet store merchandise form.

1. Find the Field Id for each field that you would like to save in the HTML form. You can find them in design mode when you focus on a field.

2. Create a form like this HTML sample, Your HTML form saves data to the same form URL, with the query string parameter "api". You put down the field id as the parameter name for each field to map them to a field on the Ragic form:

<!-- Adding the parameter html means that api server returns html instead of default JSON -->

<form action="https://www.ragic.com/start/petstore/1?html&api" method="POST">

<!-- Put down the field id as the parameter name for each field to map them to a field on the Ragic form -->

<p>Item Id: <input type="text" name="1000001" /></p>

<p>Item Name: <input type="text" name="1000003" /></p>

<p>Item Price: <input type="text" name="1000005" /></p>

<!-- Selections work the same way, just pass the selection value as parameter value -->

<p>Item Category:

<input type="radio" name="1000002" value="Dog" /> Dog

<input type="radio" name="1000002" value="Cat" /> Cat

</p>

</form>

3. Make sure that the user have access right to enter data on this form.

Note that to upload files through our API, JSON data format is not supported, and form data is the only option.

回最上面 目录

马上登记
免费试用 Ragic!

用 Google 帐号登记

立即科技 Ragic, Inc.
02-7728-8692
台北市中正区南昌路二段81号9楼