Page 1 of 1

error handling

Posted: Wed Feb 29, 2012 7:37 am
by hamidi
Script URL: http://www2.intranetupe.gov.my/
Version of script: 2.2
Hosting company: MDEC
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution: Error Handling on Custom Field.

Write your message below: i have created a few of question using custom field that provided by hesk22. but the problem, i need to have an error handling (because im using select box as an option, user need to provide which unit they working for). the error message should appear when user choose "please choose" i have a couple of answer like "please choose","ICT", "Finance", "Human Resource"). please help..

Re: error handling

Posted: Wed Feb 29, 2012 4:32 pm
by Klemen
Rather than creating a category named "please select" you need to create an option with no value for that.

In index.php change this code

Code: Select all

<select name="'.$k.'" '.$cls.'>
to

Code: Select all

<select name="'.$k.'" '.$cls.'>
<option value=""> - Please select - </option>
Then 7 lines below that code delete

Code: Select all

strlen($k_value) == 0 || 

You need to do both of above twice in the index.php file.

Re: error handling

Posted: Thu Mar 01, 2012 1:33 am
by hamidi
Dear Klemen,

Thanks for helping me. i discovered and already fixed the bug. thanks for your helping. really appreciate it