4D Blog

Home Product Expanding the abilities of the Form event command

Expanding the abilities of the Form event command

November 15, 2019

Product

As you may already know, the Form event command identifies the type of form event that has just occurred. It’s typically used within a form or object method.

Some changes have been made in 4D v18, but it’s all good. Here’s what you need to know:

1 – Renaming the command

First things first. The Form event command has been renamed as Form event code and a new FORM Event command has been created. If you’ve got something like this in your current code:

If (Form event=On Clicked)

When reopening your database, you’ll now see:

If (Form event code=On Clicked)

2 – Generic code is the way to go

Do you need to retrieve information about the current form event … using generic code? Just use the new FORM Event command in your form method! You can use the code attribute to get the event code, and the objectName attribute to find out which object triggered the event:

If (FORM event.code=On Clicked)
   Case of
     : (FORM Event.objectName="Save_button")
       ...
     : (FORM Event.objectName="Add_button")
       ...
     : (FORM Event.objectName="Remove_button")
       ...
   End case
End if

3 – More information returned

For complex objects such as list boxes or 4D View Pro areas, you may need even more information. Therefore, the FORM Event command returns additional attributes just for these objects! For example, clicking on a cell in a 4D View Pro area will add information about the coordinates of the cell in the object returned by the FORM Event command.

Find detailed information and examples on the doc center.

 

Discuss

Tags Event, Programming, v18

Latest related posts

  • January 9, 2026

    Session handling in 4D Qodly Pro

  • January 7, 2026

    Enhance your Desktop Interface with Web widgets using 4D Qodly Pro

  • January 7, 2026

    Embed Qodly pages in a 4D web area without extra cost

Fabrice Mainguené
Fabrice Mainguené
• Product Owner •Fabrice Mainguené joined 4D Program team in November, 2016. As a Product Owner, he is in charge of writing the user stories then translating it to functional specifications. His role is also to make sure that the feature implementation delivered is meeting the customer need.After obtaining a Bachelor degree in Computer Science at CNAM, Fabrice joined a small software publishing company as a Windev developer. Then he worked for different companies in industry and trade areas as a Windev and web developer as well as technical advisor on new features.
  • Deutsch
  • Français
  • English
  • Português
  • Čeština
  • Español
  • Italiano
  • 日本語

Categories

Browse categories

  • AI
  • 4D View Pro
  • 4D Write Pro
  • 4D for Mobile
  • Email
  • Development Mode
  • 4D Language
  • ORDA
  • User Interface / GUI
  • Qodly Studio
  • Server
  • Maintenance
  • Deployment
  • 4D Tutorials
  • Generic
  • 4D Summit sessions and other online videos

Tags

4D-Analyzer 4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Compatibility settings Formula Google Listbox Logs Mail Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience vscode Web Word processor

Tags

4D-Analyzer 4D AIKit 4D for Android 4D for iOS 4D NetKit 4D Qodly Pro 4D View Pro 4D Write Pro 20 R10 21 Administration AI Artificial Intelligence Build application Class Client/Server Code editor Collections Compatibility settings Formula Google Listbox Logs Mail Network Objects OpenAI ORDA PDF Pictures Preemptive Programming REST Scalability Security Session Source control Speed Spreadsheet Tutorial UI User Experience vscode Web Word processor
Subscribe to 4D Newsletter

© 2026 4D SAS - All rights reserved
Terms & Conditions | Legal Notices | Data Policy | Cookie Policy | Contact us | Write for us


Subscribe to 4D Newsletter

* Your privacy is very important to us. Please click here to view our Policy

Contact us

Got a question, suggestion or just want to get in touch with the 4D bloggers? Drop us a line!

* Your privacy is very important to us. Please click here to view our Policy