Roger
Posts: 0
Joined: Fri Mar 29, 2013 1:10 pm

how can i change the font size for a text area?

I am trying to use a TextArea to display a receipt. The TextArea is populated from a RestService and is on a ListItem and would like to do the following.

TextArea must use fixed font such as CourierNew
TextArea must use font size of 8
TextArea must grow to contain entire receipt.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

how can i change the font size for a text area?

Hello!
[quote:]TextArea must use fixed font such as CourierNew
TextArea must use font size of 8[/quote]
you would need to use CSS

[quote:]TextArea must grow to contain entire receipt. [/quote]
try the following code on service Complete event
code$('[name="mobiletextareaName"]').each(function() {$(this).height(this.scrollHeight);})/code
where mobiletextareaName - name of textarea inside the list

Roger
Posts: 0
Joined: Fri Mar 29, 2013 1:10 pm

how can i change the font size for a text area?

This works great...Thanks.

Roger
Posts: 0
Joined: Fri Mar 29, 2013 1:10 pm

how can i change the font size for a text area?

Is there a way to have the font increase if the device is changed from portrait to landscape? The Text area is increasing automatically but the font stays the same size.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

how can i change the font size for a text area?

Hi Roger - please can you clarify your question here and we will help you with this topic.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

how can i change the font size for a text area?

Hi, you can create class in CSS, for example:
code.biggerfont {
font-size: 30px !important;
}/code
On orientation change event (see https://getsatisfaction.com/apperyio/...) you can add/delete class for textarea
code$('textarea').addClass('biggerfont');/code or code$('textarea').removeClass('biggerfont');/code
Please note that you would need to check device orientation on page Show event to have correct font when page shows.

Return to “Issues”