Default Data in Long Text Field

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
User avatar
aarlauskas
Veteran Member
Posts: 127
Joined: 2019-04-28 18:03
Location: Medway, UK

Default Data in Long Text Field

Post by aarlauskas » 2020-02-23 10:15

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:

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Default Data in Long Text Field

Post by pbottcher » 2020-02-23 19:34

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
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
aarlauskas
Veteran Member
Posts: 127
Joined: 2019-04-28 18:03
Location: Medway, UK

Re: Default Data in Long Text Field

Post by aarlauskas » 2020-02-23 20:22

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 6444 times

User avatar
ronwill
Veteran Member
Posts: 228
Joined: 2015-08-08 10:12
Location: Cheltenham UK +Weatherford USA

Re: Default Data in Long Text Field

Post by ronwill » 2020-02-24 14:22

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
Ron - Gloucestershire, UK: AppGini Pro V 23.15 Rev 1484 - LOVING IT!
Plugins: Mass Update + Search Page Maker + Summary Reports + Calendar + Messages
Bizzworxx: AppGiniHelper + Inline Detail View
Alejandro Landini: To-Do List + MPI + TV Field Editor
Other: Udemy Course

User avatar
aarlauskas
Veteran Member
Posts: 127
Joined: 2019-04-28 18:03
Location: Medway, UK

Re: Default Data in Long Text Field

Post by aarlauskas » 2020-02-25 18:57

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.

User avatar
ronwill
Veteran Member
Posts: 228
Joined: 2015-08-08 10:12
Location: Cheltenham UK +Weatherford USA

Re: Default Data in Long Text Field

Post by ronwill » 2020-02-26 04:40

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
Ron - Gloucestershire, UK: AppGini Pro V 23.15 Rev 1484 - LOVING IT!
Plugins: Mass Update + Search Page Maker + Summary Reports + Calendar + Messages
Bizzworxx: AppGiniHelper + Inline Detail View
Alejandro Landini: To-Do List + MPI + TV Field Editor
Other: Udemy Course

User avatar
aarlauskas
Veteran Member
Posts: 127
Joined: 2019-04-28 18:03
Location: Medway, UK

Re: Default Data in Long Text Field

Post by aarlauskas » 2020-02-27 04:55

Thanks Ron, I'll definitely try that later on. Thank You,.

Post Reply