Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Auto-Filling Form Fields 03 Aug 2013 13:21 #10668

  • Savino
  • Savino's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 6
  • Thank you received: 0
Hey guys,

I am getting there working with cook.

This is a form on the back end of my component:
i.imgur.com/R2pTk7W.png

I would like to automatically fill the reference text field at the top using the PHP TIME() function. I.e. when I click 'New' on the collections side of my backend I want the reference text field to automatically be filled with the TIME() function.

I also want to make the pending amount field automatically fill with Total Amount - Amount Paid.

I'm sure that I have to change a few files of my component but I'm unsure of where to look.

Thanks for your help.

Please Log in or Create an account to join the conversation.

Last edit: by Savino.

Auto-Filling Form Fields 07 Aug 2013 16:26 #10710

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
You must fork the model of the concerned table.
Have a look in loadFormData()
Coding is now a piece of cake

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Time to create page: 0.098 seconds

I jumped and started to work on a demo component... but 2 days later this demo component became the real component. I just showed today the end result to my customer and he turned to me and said... "this is more than I expected"... All of this is because Cook did cut about 70% of my work and provided me more ways to improve the usability of the component. The end result was 17 tables all related between than to generate a full dashboard for the travel agents. Thanks for Cook developers for such great tool. This component would not be possible to be done at short time with all the features in it
Griiettner (Forum)  

Get Started