meOmy Posted December 19, 2016 Share Posted December 19, 2016 Hi guys,Never done anything like this, so wondering how you would go about doing it.Imagine a document that has three check boxes (Yes, No, Maybe) and one of them must be marked with an 'X' when printed and handed to some fictional office.Now online, I would prefer to code a single drop-down menu with the three options that saves the answer to my db. However, I'm not sure how I would get the saved data to be placed, in the proper checkbox, on the outputted form when I create a PDF.Would you save the data to one db field or would you create three separate db fields; one for each possible answer? This way, you could put the output code in each position on the form and then only one of them would appear?Sorry for this being such an ambiguous write-up. Bottom line, would you save all three possible answers to one db field or would you create three db fields; one for YES, one for NO, and one for MAYBE?I'll figure out how to do it later, I just want to know the best way to store the data to make it easier to get on a printed document/pdf later.Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/302774-best-method-for-saving-online-form-mysql-for-output-2-pdf/ Share on other sites More sharing options...
cyberRobot Posted December 19, 2016 Share Posted December 19, 2016 You only need to save the selected response (Yes, No, or Maybe). Once you know which option was selected, you know the others are not. As for the selection method, I would use radio buttons instead of a drop-down menu. Radio buttons require less interaction from the user. And I wouldn't be surprised to find users who are less than familiar with drop-down menus. However, if space is an issue, a drop down may be better. 1 Quote Link to comment https://forums.phpfreaks.com/topic/302774-best-method-for-saving-online-form-mysql-for-output-2-pdf/#findComment-1540489 Share on other sites More sharing options...
Stefany93 Posted January 13, 2017 Share Posted January 13, 2017 You only need to save the selected response (Yes, No, or Maybe). Once you know which option was selected, you know the others are not. As for the selection method, I would use radio buttons instead of a drop-down menu. Radio buttons require less interaction from the user. And I wouldn't be surprised to find users who are less than familiar with drop-down menus. However, if space is an issue, a drop down may be better. ^^ I read somewhere that only if the options are more than 6, then you use a drop-down instead of radio buttons. Since you have 3 options, use radios. Quote Link to comment https://forums.phpfreaks.com/topic/302774-best-method-for-saving-online-form-mysql-for-output-2-pdf/#findComment-1541325 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.