Author Topic: Complex form best practise  (Read 4546 times)

kenshin

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 24
    • View Profile
Complex form best practise
« on: April 26, 2012, 05:36:43 AM »
Hi Michael,

I am working on a complex form (20-30 items: textarea and popup list) that must be used for some data-entry.
I saw that your class UIInput send a message to the receiver, but in this way each item of the form require a single script.

How I can build a good form manager, that take care to read each item when I click on a submit button?

Exist a better way to collect user input when I do a "form submit"?

Kenshin

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Complex form best practise
« Reply #1 on: April 26, 2012, 02:48:50 PM »
You can change the name of the function to something else... like "OnLoginSubmit" for example, and have it point to the object that has your manager on it. Alternatively you can use UIEventManager.Get(inputGameObject).onSubmit += YourManagersFunction;