Picture of Jason Chui
Textarea Component available?
by Jason Chui - Friday, 23 April 2021, 1:22 AM
 

I'm looking for a textarea component that allows users to enter any number of lines of text. The textInput component I found only allows for one single line of input.

Moreover, I am hoping to save the newline / tab / spaces that the users enter into the text area, so that I can retrieve them exactly the way users enter in.

e.g. Users enter the following:

if(x = True):

    x = x + 1

    danger()

 

I hope to be able to save the exact thing that users enter into a database (for example), for verbatim retrieval.

Picture of Mike Stevens
Re: Textarea Component available?
by Mike Stevens - Friday, 23 April 2021, 2:01 PM
 

Hi Jason,

I recently had to modify the textInput component to accommodate a textarea input perhaps this will help your situation. You can find it here on my github repository...

https://github.com/zarek3333/adapt-contrib-textInput

Picture of Jason Chui
Re: Textarea Component available?
by Jason Chui - Monday, 26 April 2021, 1:52 AM
 

Hi Mike,

I downloaded the latest version from your github page, but when I upload the plugin to my Adapt Authoring Tool, the textarea part doesn't seem to appear.Screenshot of component in Authoring Tool and some parts of code

Although the checkbox does exist when in the component view in the Authoring Tool, but when I search through the Javascript files, in particular textInputModel.js, no where does it seem to check for the textarea checkbox property and change the textbox to textarea.

Picture of Mike Stevens
Re: Textarea Component available?
by Mike Stevens - Monday, 26 April 2021, 2:01 PM
 

Hi Jason,

I tested it out and definitely is working as it should take a look at the screen shot below, I also included my version of the framework and authoring tool in case you are using another version of either. 

My guess would be you didn't delete the original adapt version of the textinput component before installing this one so there is some overlap. Please try deleting the textinput in the mongodb and plugins & temp folders then try reinstalling my version. Also please force rebuild the course so the changes can get pulled in.



Picture of Jason Chui
Re: Textarea Component available?
by Jason Chui - Thursday, 29 April 2021, 2:25 AM
 

Hi Mike,

You are right! Force rebuilding the course did the trick.

Thanks for the plugin! You guys are great!