Advertisement:

Author Topic: /index.php?page=contact  (Read 2843 times)

code monkey

  • Full Member
  • ***
  • Posts: 204
/index.php?page=contact
« on: March 12, 2011, 11:36:38 pm »
Validation doesn't work because the onSubmit="" was set incorrectly in the 'Modern' theme.

<form action="index.php" method="post" onsubmit="javascript:return contactForm();">

If you change it to validate_contact() it works.

<form action="index.php" method="post" onsubmit="javascript:return validate_contact();">

However, php doesn't validate email.
If user has javascript turned off, you can send form without the email.
With the javascript validation, both email and message fields are required.
Might need to add email validation in php before submitting.

_CONEJO

  • Administrator
  • Hero Member
  • *****
  • Posts: 4689
Re: /index.php?page=contact
« Reply #1 on: March 14, 2011, 12:26:59 pm »
Hi,

I created a issue in other bug/task system, you could follow the development here : http://issues.osclass.org/browse/OSCLASS-366

Thanks! We'll fix it soon.

Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2382
Re: /index.php?page=contact
« Reply #2 on: March 14, 2011, 02:16:58 pm »
You're right. Now:
    - onsubmit js function modified to validate_contact
    - we validate in php the mail address too
    - now there's a new helper: osc_contact_url It's easier to use in the themes