We're using version 2.1 of Help Desk.
We would like to know if there's any way of restricting a customized field to only one option in a text box. We have a support site and buyer's must type in the word YES stating they have read the policies. Once again we've received idiot people who have placed other items inside this box.
Currently we have restricted the box to 3 positions. Is there anyway to set up a field that says that customized field must equal YES.
So far we have changed it to a drop down box with two options of YES and YES, but we would like to have it so that the buyer physically types in YES into the customized text field. If they dont they cannot complete the ticket.
Thanks very much K for all your help.
Restricting Customized Field
Moderator: mkoch227
Re: Restricting Customized Field
In the submit_ticket.php try adding this code just ABOVE
In the code change $custom1 to $customID where ID is the number of the custom field (so if this is 5th field it should be $custom5 ).
Code: Select all
if (strtoupper($custom1) != 'YES')
{
$hesk_error_buffer[]='You need to type <b>YES</b> into the Agree to terms? box.';
}
Code: Select all
if (count($hesk_error_buffer)!=0)
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here 
You should follow me on Twitter here
Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools


Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...
Also browse for php hosting companies, read php books, find php resources and use webmaster tools