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

TOPIC:

Form fill date_till after date_from is filled 30 Jun 2012 16:15 #2721

I have a form with two date fields: dt_from and dt_till.
I want to create an OnChange event. After typing in a value in the dt_from field i want to fill the dt_till field with the dt_from + 7 days.

Who can help me with that?
Molenwal1 Webdesign
www.molenwal1.nl

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

Re: Form fill date_till after date_from is filled 02 Jul 2012 09:00 #2727

  • admin
  • admin's Avatar
  • Offline
  • Administrator
  • Administrator
  • Chef
  • Posts: 3711
  • Thank you received: 986
Anywhere in JDom, you can use the 'selectors' parameter.
JDom::_('html.form.input.text', array(
	...
	'selectors' => array(
		'onChange' => htmlspecialchars("My javascript code"),
		'rel' => 'foo',
		...
	)
));

Not tested, maybe some syntax error, but the idea is that.
'selectors' parameter is unherited for all the classes under 'html.xxx'
JDom is open and unlimited.
Coding is now a piece of cake

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

Last edit: by admin.
  • Page:
  • 1
Time to create page: 0.057 seconds
Great UX great performance and definitely a time saver. It only took me 10 minutes of playing around before purchasing a subscription and right now I just want to throw more money at you! I just started a new project and after just 4h I can already tell it probably saved me several days of work. I'm building a wholesale ordering system with sales rep management. I have not looked at the code yet but so far: impressive.
flip (Forum)

Get Started