Jump to content

Ricklord

Members
  • Posts

    60
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

Ricklord's Achievements

Member

Member (2/5)

0

Reputation

  1. Thank you so much. I will get to it later today.
  2. Still looking for any input on this one ???
  3. Oh i thought you might need the code from the new_ticket.php file the form is posted to: <?php include_once("config.php"); include_once("header.php"); if(isset($post_vars['act'])) { $act=$post_vars['act']; } else { $act=""; } switch($act) { case NULL: // Open a ticekt form $supp_obj->open_a_ticketfrm($supp_obj,$session_vars,$generic_msg); break; case "openticket": $return_vars=$supp_obj->submit_ticket($supp_obj,$session_vars,$post_vars,$generic_msg,$file_vars); //print_R($return_vars); if($return_vars['status']==false) { $post_vars['status_msg']=$return_vars['status_msg']; $supp_obj->open_a_ticketfrm($supp_obj,$session_vars,$generic_msg,$post_vars); } break; } include_once("footer.php"); ?> and also this is the javscript code above the form <script language="JavaScript"> function validate_ticket(frm) { with(frm) { var flag1=validate_field(client_name,'{{cNoname}}'); if(flag1==false) { return false; } if(!isEmailAddress(email.value)) { alert('{{cNoemail}}'); email.focus(); return false; } {{custom_javascript}} var flag1=validate_field(pass_word,'{{cNopassword}}'); if(flag1==false) { return false; } if(pass_word.value!=password_confirm.value) { alert("{{cPasswordmismatch}}"); return false; } var flag3=validate_field(dept_id,'{{cNodepartment}}'); if(flag3==false) { return false; } var flag1=validate_field(priority_id,'{{cNopriority}}'); if(flag1==false) { return false; } var flag1=validate_field(subject,'{{cNosubject}}'); if(flag1==false) { return false; } var flag1=validate_field(message,'{{cNomessage}}'); if(flag1==false) { return false; } return true; } } </script>
  4. Hi Guys, The form below is part of a new ticketing system i am playing around with. I dont know much about it yet but i want to add a mandatory checkbox to the form and also a text area which contains my terms and conditions. The form below is part of submitting a new ticket and before they can do so i want them to have to check the box below my terms and conditions saying they have read and agree. I'm no expert on forms but im guessing this could be acheived by adding a text area and a checkbox. Most important thing >>>> If the checkbox is not checked i want a pop up warning to pop up saying please tick the box or something like that. Heres the form anyway: <form name="new_ticket" method="post" action="new_ticket.php" onSubmit="return validate_ticket(document.new_ticket);" enctype="multipart/form-data" > <input type="hidden" name="act" value="openticket"> <div class="sub-heading"> {{cClient_newtickettitle}} </div> <div class="formheading"> <span class="label"> {{cLogin_direct}} </span> </div> <div class="formrow"> <span class="label">{{cClient_fullname}}:</span> <span class="field"><input name="client_name" type="text" class="singleline-field" id="full_name" value="{{client_name}}" /> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cClient_phone}} : </span> <span class="field"> <input type="text" name="phone" value="{{phone}}" class="singleline-field"> </span> </div> <div class="formrow"> <span class="label"> {{cClient_email}} : </span> <span class="field"> <input type="text" name="email" value="{{email}}" class="singleline-field"> <span class="mandatory-fld"> * </span> </span> </div> <{customfields_loopstart}> <div class="formrow"> <span class="label"> <{field_name}> : </span> <span class="field"> <{draw_field}> </span> </div> <{customfields_loopend}> <div class="formrow"> <span class=label> {{cDepartment}} : </span> <span class="field"> <select name="dept_id" class="singleline-field"> <option value="">{{cSelect}}</option> <{dept_loopstart}> <option value="<{dept_id}>" <{selected}> ><{dept_name}></option> <{dept_loopend}> </select> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cTicket_priority}} : </span> <span class="field"> <select name="priority_id" class="singleline-field"> <option value="">{{cSelect}}</option> <{priority_loopstart}> <option value="<{priority_id}>" <{selected}> ><{priority_name}></option> <{priority_loopend}> </select> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cTicket_subject}} : </span> <span class="field"> <input type="text" name="subject" value="{{subject}}" class="textarea-field"> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cTicket_message}} : </span> <span class="field"> <textarea name="message" cols="{{cols}}" rows="{{rows}}" class="textarea-field" id="comments">{{message}}</textarea> <span class="mandatory-fld"> * </span> </span> </div> <{attachment_start}> <div class="formrow"> <span class=label> {{cTicket_attachment}} : </span> <span class="field"> <input type="file" name="attachment" value="" size="50" /> ({{cMax}} {{attachment_size}} {{cKb}}) </span> </div> <{attachment_end}> <div class="formheading"> <span class="label"> {{cProvide_password}} </span> </div> <div class="formrow"> <span class="label"> {{cPassword}} : </span> <span class="field"> <input type="password" name="pass_word" class="singleline-field"> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class="label"> {{cPassword_confirm}} : </span> <span class="field"> <input type="password" name="password_confirm" class="singleline-field"> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class="field"> <input type="submit" name="Submit" value="{{cSubmit}}" class="stdbutton-field" /> <input type="reset" name="reset" value="{{cReset}}" class="stdbutton-field" /> </span> </div> </form> I also have a number of other forms i will want to add this feature too so if anyone edits the code please highlight the part you added for me to see easily and then i can just copy it to my otehr forms. Thanks in advance
  5. Solved. If anyone else is interested in knowing this is what i found. After doing some text searches i managed to find a file stored in the helpdesk directory called genric.php in this file it defines what should go where it says: line89 in file below {{cClient_fullname}} I just changed it in there so now everywhere within the help desk software instead of it saying Full Name it says Company Name... YAY!!!!
  6. Hi Guys, I've just got the free version of helpdeskpilot availablel from there website www.helpdeskpilot.com I've had it for 15 minutes got it installed and already want to make some minor changes just to get the ball running. The first thing i notice is the forms are stored in template files (.tpl) so it is these files i want to edit. When a customer submits a ticket for the first time they have to enter there details which are used for loging in next time to check the status. At present on the form it says Full Name: which would be Joe Bloggs. Now what i want to do is change the text output instead of Full Name: i want Company Name: Reason for this is becuase this field is key for tarcking activity. I want to leave teh actual field ID's the same so i dont have to change it all over the software but just change the out put text on the form. Anyway heres the template file and the line in question is around line 89. I was wondering how i could make this out put as Company Name, rather than Full Name????? You can see the form on my test site here: http://www.creativecogs.com/support/new_ticket.php?tab=tickets Oh yeah and heres teh code for that page: <script language="JavaScript"> function validate_ticket(frm) { with(frm) { var flag1=validate_field(client_name,'{{cNoname}}'); if(flag1==false) { return false; } if(!isEmailAddress(email.value)) { alert('{{cNoemail}}'); email.focus(); return false; } {{custom_javascript}} var flag1=validate_field(pass_word,'{{cNopassword}}'); if(flag1==false) { return false; } if(pass_word.value!=password_confirm.value) { alert("{{cPasswordmismatch}}"); return false; } var flag3=validate_field(dept_id,'{{cNodepartment}}'); if(flag3==false) { return false; } var flag1=validate_field(priority_id,'{{cNopriority}}'); if(flag1==false) { return false; } var flag1=validate_field(subject,'{{cNosubject}}'); if(flag1==false) { return false; } var flag1=validate_field(message,'{{cNomessage}}'); if(flag1==false) { return false; } return true; } } </script> <br /> <div class="tickets-main"> {{cNew_ticket}} </div> <{errormsg_start}> <div class="errormsg"> {{status_msg}} </div> <{errormsg_end}> <div class="form-container"> <form name="new_ticket" method="post" action="new_ticket.php" onSubmit="return validate_ticket(document.new_ticket);" enctype="multipart/form-data" > <input type="hidden" name="act" value="openticket"> <div class="sub-heading"> {{cClient_newtickettitle}} </div> <div class="formheading"> <span class="label"> {{cLogin_direct}} </span> </div> <div class="formrow"> <span class="label">{{cClient_fullname}}:</span> <span class="field"><input name="client_name" type="text" class="singleline-field" id="full_name" value="{{client_name}}" /> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cClient_phone}} : </span> <span class="field"> <input type="text" name="phone" value="{{phone}}" class="singleline-field"> </span> </div> <div class="formrow"> <span class="label"> {{cClient_email}} : </span> <span class="field"> <input type="text" name="email" value="{{email}}" class="singleline-field"> <span class="mandatory-fld"> * </span> </span> </div> <{customfields_loopstart}> <div class="formrow"> <span class="label"> <{field_name}> : </span> <span class="field"> <{draw_field}> </span> </div> <{customfields_loopend}> <div class="formrow"> <span class=label> {{cDepartment}} : </span> <span class="field"> <select name="dept_id" class="singleline-field"> <option value="">{{cSelect}}</option> <{dept_loopstart}> <option value="<{dept_id}>" <{selected}> ><{dept_name}></option> <{dept_loopend}> </select> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cTicket_priority}} : </span> <span class="field"> <select name="priority_id" class="singleline-field"> <option value="">{{cSelect}}</option> <{priority_loopstart}> <option value="<{priority_id}>" <{selected}> ><{priority_name}></option> <{priority_loopend}> </select> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cTicket_subject}} : </span> <span class="field"> <input type="text" name="subject" value="{{subject}}" class="textarea-field"> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class=label> {{cTicket_message}} : </span> <span class="field"> <textarea name="message" cols="{{cols}}" rows="{{rows}}" class="textarea-field" id="comments">{{message}}</textarea> <span class="mandatory-fld"> * </span> </span> </div> <{attachment_start}> <div class="formrow"> <span class=label> {{cTicket_attachment}} : </span> <span class="field"> <input type="file" name="attachment" value="" size="50" /> ({{cMax}} {{attachment_size}} {{cKb}}) </span> </div> <{attachment_end}> <div class="formheading"> <span class="label"> {{cProvide_password}} </span> </div> <div class="formrow"> <span class="label"> {{cPassword}} : </span> <span class="field"> <input type="password" name="pass_word" class="singleline-field"> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class="label"> {{cPassword_confirm}} : </span> <span class="field"> <input type="password" name="password_confirm" class="singleline-field"> <span class="mandatory-fld"> * </span> </span> </div> <div class="formrow"> <span class="field"> <input type="submit" name="Submit" value="{{cSubmit}}" class="stdbutton-field" /> <input type="reset" name="reset" value="{{cReset}}" class="stdbutton-field" /> </span> </div> </form> <div class="mandatory-txt"> {{cMandatory_txt}} </div> </div> <script language="JavaScript"> document.new_ticket.client_name.focus(); </script> Any ideas what to change or where to look next? Rick
  7. Hi, Thanx for that reply. 1.let me see if i got a few things straight. NOT NULL would mean something has to be entered in this field and NULL allows the field to be blank. 2.Default text area, i guess would be used for example a login page, so username field come be defaulted to say... <enter your username here> 3.the extra column i will leave blank for now as you suggested 4.as for the reply about using SERIAL as a type. the guide i am using that tells me to use this type is a PHP & MySQL everyday apps for dummies guide. All i can tell you is that ti am using procedural approach instead of object oriented. Is this the best way? Also i have looked down my list for AUTO_INCREMENT type but i cant find it. Any other suggestions. 5. Im still a little worried about the collation column, can i leave this or does it need to be used? more feedback still needed for clarification on above please. thanks in advance rick
  8. Hi, Im having problems when it comes to adding the tables to by database. I am following a dummies guide book on creating a CMS. I have created the database but the guide isnt very clear when it comes to the information stored in the tables. This is just a few of the fields i have got for 1 of the tables: Table name: dept_user Field names and details seperated by <> Field:user_name <> Type:VARCHAR(255) <> Primary Key Field:dept_id <> Type:INT Field:password <> Type:VARCHAR(255) There is 7 fields in total but these are the 3 different types for the first table. I am using phpmyadmin on my hosting server to configure the tables and i have the ability to create the table and get to the page where i need to add the fields. I have started adding the fields but become concerend when i was leaving alot of empty boxes for each field. For example: Field = name (ok) Type = VARCHAR (ok) Lengh/Values = 255 (not to sure on this one but am i right here?) Collation = (i have no idea what this is for) Attributes = (i have no idea what this is for) Null= (null or not null????, i dont know which to choose) Default= (free text field, again dont know what for) Extra= (dont know what this is for) Then at the end of the row i get to choose primary key/index/unique/full text or leave radio button with --- above it selected. Ok so now i hav etried to explain that as best i can i guess what im after is to find out if the fields i am not sure about are important and if so what value they should be? The main one is Collation as im guessing i need to pick something from the drop down menu here. Finally on all of the other tables i need to create, they all have a field with type set to { SERIAL } when i look down the type drop down menu i cant see this on there. What should i use instead and would i need to change anything in my php files which link to this or has the SERIAL type been replaced with another type???? I hope i have explained my self so you guys can understand me. Im kinda new to phpmyadmin and mySQL but ive got to start somewhere and as i need a CMS i thought id do it myself from the dummies guide i have. Thanks for any responses in advance Rick
  9. Ok so we fixed the pargraph issue and i have now changed my top images for my containers to be 10px high so the padding looks nice all the way around. In IE it keeps the line height to 20px but in firefox it works fine. one exaxmple below. [code] #content_top { width:580px; height:10px; background-image:url(images/content_top.gif); background-repeat:no-repeat; } [/code] i have tried max-height but this doesnt work either. In the container in the html there is nothing there so look slike this [code] <div id="content_top"></div> [/code] any fixes for this IE problem? cheers Rick
  10. Thanks Wildteen I haven't done it the way you suggested but your suggestions opened my eyes to something i wasnt seeing. I have created my styles in my CSS i.e content_p and content_h1 Then just used <span class="content_h1">Example Header here</span> This seems to do the trick and i can still manager my font styles from within the CSS. Cheers again Rick
  11. What if i wanted to define 2 different styles i.e headers and paragraphs? Rick
  12. Hi Guys, I have created yet another test site but this one will demonstrate an ecommerce store. you can view the page here [url=http://www.creativecogs.co.uk/ecommerce_demo]www.creativecogs.co.uk/ecommerce_demo[/url] If you view the page in IE its fine but if you view it in firefox the background image of the containers has a gap when i add text using <P>example text here</P> Any suggestions on how to fix this? my code is below. CSS for container [code] #content_main { float:right; width: 580px; } #content_top { width:580px; height:20px; background-image:url(images/content_top.gif); background-repeat:no-repeat; } #content_body { width:545px; padding: 0px 0px 0px 0px; background-image:url(images/content_body.gif); background-repeat:repeat-y; } #content_bottom { width:580px; height:20px; background-image:url(images/content_bottom.gif); background-repeat:no-repeat; } [/code] HTML used in this container [code] <div id="content_main"> <div id="content_top"></div> <div id="content_body">   <p>Example text here</p> </div> <div id="content_bottom"></div> </div> [/code] Its the paragraph which is throwing the formatting out but i need to use pargraphs to define text style in my style sheet dont I??? Cheers Rick
  13. Cheers Andy, Managed to get it to work now, not sure if its the corrent way but looks alot tidier now its in CSS with the rest of the page. That site was helpful but didnt give me the exact answer. Cheers again Rick
  14. Can you post the code?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.