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.069 seconds

Hi All just wanted to add one more "thank you" voice to all those who discovered the value of this amazing application. The website I was working on went to production few days ago and I do not want to even try to imagine what would it take to build it without j-cook. So - endless thanks keep it running and evolving I believe it deserves to be the core tool for any joomla application! Thanks!
Michael (bmk028 - Forum)  

Get Started