Create "My Int" Field Type

Q

How to Create "My Int" Field Type?

✍: FYIcenter.com

A

If you want to create a new field type to take integer numbers only, you can following this tutorial.

1. Login as Admin to Form Tools and go to "Modules > Custom Fields". You should see a list of existing field types.

2. Click "Add Field Type" in the "Special Fields" group. You should see the "Add Field Type" dialog box.

3. Enter the following settings:

Field Name: My Int
Field Type Identifier: my_int
Base field type on: Textbox

4. Click "Add Field Type" to continue. You should see detailed definitions of the new field type.

5. Select "Small (<=20 chars)" as the "Compatible Field Sizes" on the main tab.

6. Click "Update" to save it. "My Int" will inherite "Display/Saving" settings and 5 validation rules.

5. Go back to the form definition page and add a new field using "My Int" as the field type. Remember to set "Data Type" to "Numbers", and turn on the "Numbers only" validation rule.

Now "My Int" is ready to use a custom field type.

 

⇒ Add JavaScript Validation Function

⇐ What is Custom Fields Module

⇑ Using Custom Fields Module

⇑⇑ Form Tools - Frequently Asked Questions

2019-12-02, 980🔥, 0💬