Autocomplete fields in Scriptcase are used when we have to fill a field in a form application that already has a value set in the database, for example, when adding a sale in the system, we associate the sale to a seller previously registered in the database, in this case when start to type the initials or any other part of the name of the seller, the Scriptcase, will automatically displays a list of all the sellers that have the characters in his name or surname.

 

On this sample it will be shown two useful resources, the AJAX autocomplete function and the capture link

Creating a form application

1. Create a new form based on the orders table

2. Click on Fields Positioning.

 

 
   
 

 

3. Select the fields OrderID, CustomerID, OrderDate, RequiredDate e ShippedDate.

 

 
   
 

 

Editing the form’s fields

4.Open the Fields folder and click on the CustomerID field.

 

 
   
 

 

5. Change the Data Type attribute to Text Autocomplete .

6. Access the tab Edition Lookup in the CustomerID field and enter the instructions below for the SQL Select Statement:

SELECT CustomerID, CompanyName
FROM customers
ORDER BY CustomerID

7. Enable the options Show label with the description and Capture Text. On Label enter Search.

 

 
   
 

 

8. Click on the button “Run application”.

 

 
   
 

 

 

Click on the link below to see the application running.

http://www.scriptcase.net/scriptcase-samples/php-form/autocomplete-using-capture/

Check out more content on our blog!
Learn all about Scriptcase.

By ,

June 2, 2015

a

You might also like…

Security in web applications

In this article, you will learn about web application security and the options within Scriptcase th...

“We have developed the Connected Citizen Card, which assists public administrators in decision-making and policy creation.”(Assist Soluções em TI)

Check below how Assist Soluções em TI used Scriptcase to modernize and streamline the development...

AI-Driven Software Development: The Role of ChatGPT

In the rapidly evolving world of technology, artificial intelligence (AI) is playing an increasingl...

You might also like…

Get new posts, resources, offers and more each week.

We will use the information you provide to update you about our Newsletter and Special Offers. You can unsubscribe any time you want by clinck in a link in the footer of any email you receive from us, or by contacting us at sales@scriptcase.net. Learn more about our Privacy Police.