-
Notifications
You must be signed in to change notification settings - Fork 501
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8288 multi line textarea in guestbook #8291
8288 multi line textarea in guestbook #8291
Conversation
…ons for input for guestbook.
…es and expandable
Thanks @mdmADA. We'll review the code, but can you add a screenshot when you have a chance? Thanks! |
I added the screenshot to the description above ^^. Thanks Danny. |
Thanks @mdmADA! I think this provides a much better writing experience for those filling out guestbooks. @TaniaSchlatter - I added one additional screenshot above (of the create process). My big question is if "Text Area" is the right wording here from your perspective. FWIW, Qualtrics has three options that provide various entry lengths:
I'm not suggesting three options but it's interesting to see their wording on the options, and it's another tool used often by researchers. |
Thanks for the screenshots, @mdmADA. It's great to have this useful functionality. I'd support naming that is a little more clear. @djbrooke mentioned Qualtrics naming. Google Forms uses "short answer" and "paragraph" for two text entry options. I think either "single line" and "multiple line" or "single line" and "paragraph" provide clearer naming. |
…for textarea of guestbook to 'Multiple Line' to make it clearer.
Thank you both for the feedback - your suggestions do make it clearer. I will go with the 'Single Line' and 'Multiple Line'. Let me know if you would like anything changed. Thanks! |
Thanks @mdmADA and @TaniaSchlatter ! @sekmiller all yours! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thank you for this enhancement!
@mdmADA Would you please refresh from develop? We've recently released v5.9 and the version is part of the code and I need it to build and test, thanks. |
@kcondon I went ahead and updated from develop |
@mdmADA This generally works but noticed that responses in the text area type that span multiple lines is handled differently by different opening apps -dataverse converts cr to spaces, excel keeps up to the first cr and puts the rest in a new row, first column, numbers appears to do something similar to Excel. Anyway that content can be confined to the cell it is supposed to be in, maybe writing out response in quotes? |
Good catch @kcondon. I was only thinking of text input, and not how it might be read after the fact and didn't think to test that. I will see if writing the response in quotes addresses the issue and let you know. |
…if asString is true) for csv files.
@kcondon - I updated the selectCustomQuestionAnswers() method in GuestbookREsponseServiceBean.java to escape the values pulled from the database for writing to csv files. It will work with responses containing newline, comma and/or double quotes. I tested with Excel and Numbers (noting that you have to fix the setting sin numbers to delimited instead of fixed length for it to show properly). I fixed the UI so it also shows newlines in the guestbook-responses.xhtml to keep things consistent between the ui and excel, etc. by replacing any newlines in the response text pulled from the database with " I also had to change guestbook-responses.xhtml to use outputText so I could set escape="false" so the Let me know if there are any changes needed. |
…onse pulled from db with <br /> so the newlines will render in the UI (guestbook-responses.xhtml)
…it escape="false" so any <br />'s in the customQuestion responses will render as newlines in the UI.
Thanks @mdmADA for the updates to this issue, we'll take another look! |
What this PR does / why we need it:
Adds an expandable textarea customquestion questiontype for the guestbook.
The text area starts out with 8 lines but is expandable to as many as required.
Which issue(s) this PR closes:
Closes #8288
Special notes for your reviewer:
Suggestions on how to test this:
Create a new guestbook. For the question type, there should now be 3 choices: Text, Text Area, Multiple Choice
Choose 'Text Area'.
Assign this guestbook to a dataset.
Log in as a regular user and navigate to the dataset assigned the guestbook in the previous step.
Download a file. Ensure the custom question set as 'Text Area' is a multi-line expandable textarea component.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Yes but minor. Simply allows a larger multi-line textarea input.
Changes to Guestbook Creation Process:
Changes to Guestbook display:
Is there a release notes update needed for this change?:
Not sure.
Additional documentation:
The 'response' field of the customquestionresponse table is of type 'text' which allows unlimited text so adding a textarea should not be an issue.