Page 1 of 1

Default Data in Long Text Field

Posted: 2020-02-23 10:15
by aarlauskas
Hello, I would like to insert some default data (with multiple lines) in 'Long Text) field. In Appgini program there is an option 'Default' where you can select some automatic values (DateCreated or type random text etc), which will appear in that field. What I need to achieve, I need to have data with multiple lines like in example below. I can make it in single line from Appgini 'Default' option, but how can I do line breaks so it displays 4x lines?

New Kit Make & Model:
New Kit Serial Number:

Old Kit Make & Model:
Old Kit Serial Number:

Re: Default Data in Long Text Field

Posted: 2020-02-23 19:34
by pbottcher
Hi,

what field do you have. Is it a text field, richt text, ... ? Is it read only or are you expecting the user to enter data? Maybe you can post a screenshot

Re: Default Data in Long Text Field

Posted: 2020-02-23 20:22
by aarlauskas
Hi, its a text field, set in Appgini Data type as 'Long Text'. Not rich text, not read only. Yes I want user to enter the data, basically to add extra bits of data to that field. When user adds new record, this field needs to be with some default text in it already, but I need this NOT in single line which I can do from Appgini. I need for example 4 seaprate lines in it. So I dont know how to break the text in 4 separate lines as default data.
text field.png
text field.png (9.8 KiB) Viewed 7452 times

Re: Default Data in Long Text Field

Posted: 2020-02-24 14:22
by ronwill
Just use the standard Data Type: Text + Rich (HTML) area and enter in default field your desired html source code i.e. something like:
Line1<br>Line2<br><br>Line3<br>Line4 to get

Line1
Line2

Line3
Line4

Cheers,
Ron

Re: Default Data in Long Text Field

Posted: 2020-02-25 18:57
by aarlauskas
Hi Ron, Thanks for this. I know it works with HTML Editor, so I guess <br> breaks only works with editor and not other types of field. Probably long shot, but is it possible to hide the toolbar of the editor? I dont want users mess about the tools included in the editor, just want them to add the data required and leave.

Re: Default Data in Long Text Field

Posted: 2020-02-26 04:40
by ronwill
I rarely use the nicEditor as I prefer to use CKEditor, partly because of the menu bar etc. That said I did find the following that should solve the issue for you:

https://bigprof.com/blog/appgini/custom ... om-a-page/

Cheers,
Ron

Re: Default Data in Long Text Field

Posted: 2020-02-27 04:55
by aarlauskas
Thanks Ron, I'll definitely try that later on. Thank You,.