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

Awards for the best Joomla app. This product is gonna win an award for this amazing job. Cook Self Service is the the best application from all over the Joomla universe ! It brings Joomla to a professional level really advanced for developers. It is a real fun to develop with it. The ACL part and security checks implementation are just... so much hours saved. I can now concentrate myself more on the design part and the creative works. Thank you so much. Guys I offer you all my congratulation ! Keep up the works because Joomla is needing it to increase the quality of extensions availables on the JED. I also learned a lot because I can see how to code at the proper place and I found all my answers reading the forum.
lack_hanson (JED)
          

Get Started