budlink Posted January 8, 2009 Report Share Posted January 8, 2009 I have finally gotten a 'help desk' html form to work and love how PHP makes the results much prettier than CGI... My users have asked if there is a way to either 'bold' the results if the field has a value or eliminate those fields with no value. If this WERE a cgi form then the empty fields would not display so I am telling my users no... So - is there some way to either bold or change the color in the PHP form handler results? I've been canvassing the internet for the last two days as well as going through my various manuals and haven't seen anything available... I'm just in the learning stage with php so would appreciate any input!! jt Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 8, 2009 Report Share Posted January 8, 2009 My users have asked if there is a way to either 'bold' the results if the field has a value or eliminate those fields with no value. If this WERE a cgi form then the empty fields would not display so I am telling my users no... So - is there some way to either bold or change the color in the PHP form handler results? probably... it will depend on the script you are using, and how easy it is to modify. You have a link both to your form and to the script you are using? I'm not sure if I totally understand what you are wanting to do, but if I looked at the form you are talking about, I'd probably understand better. Quote Link to comment Share on other sites More sharing options...
budlink Posted January 8, 2009 Author Report Share Posted January 8, 2009 Here is a sample of my PHP: "------------ PRINTER PROBLEMS ------------\n\n" . "Printer ID: $printer_ID\n" . "Closest Column: $printer_column\n" . "Description: $printer_prob\n\n" . "------------ MS WORD or EXCEL PROBLEM ------------\n\n" . "Word or Excel Problem: $msProb\n\n" . "------------ LOTUS NOTES RESET ------------\n\n" . "Reset Notes Password: $reset_notes\n" . "Lotus Notes Problem Description: $reset_notes_other\n" . IF there is NO entry in the actual form field, there would be NO data to display. BUT... If, say, someone enters a 'yes' for Lotus Notes Reset and then enters something in the Lotus Notes Problem Description field, is there any way I can code the PHP so that the email message displays the data entered as either BOLD text or in a color (say red) so that the entries stand out more from the empty field identifiers? Hopefully I have better explained my question... jt Quote Link to comment Share on other sites More sharing options...
falkencreative Posted January 8, 2009 Report Share Posted January 8, 2009 It depends if you are sending this email as an html email, or a plain text email (which would have no styling). This has some more information on that: http://webcheatsheet.com/php/send_email_text_html_attachment.php#html Once you are sending HTML email that can be styled, the easiest thing to do would be to add a tag around the text you want bolded. $reset_notes_other Quote Link to comment Share on other sites More sharing options...
budlink Posted January 8, 2009 Author Report Share Posted January 8, 2009 (edited) I did change this to html email and the 'formatting' I have in place disappears but I DID get my text to bold!! So I am back to a long form showing all the field names in a 'formatted' email message (i.e: "------------ PROBLEM/REASON ------------\n\n" . "Reason for message: $printer\n" . "Reason for message: $microsoft\n" . "Reason for message: $reset\n" . "Reason for message: $equipment\n" . "Reason for message: $novell\n" . "Reason for message: $notes\n\n" . "------------ PRINTER PROBLEMS ------------\n\n" . etc... Thanks anyway for your help! As I said, I am very new to PHP so expect to encounter better ways of doing this as I discover the nuances of coding and using in PHP. jt Edited January 8, 2009 by budlink Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.