Forum

Accueil » Alloy UI » English

Vue combinée Vue Plate Arborescence
Sujets [ Précédent | Suivant ]
toggle
Jerome Comouth
How to have a bigger input field?
24 juillet 2014 02:43
Réponse

Jerome Comouth

Rang: Junior Member

Publications: 25

Date d'inscription: 7 avril 2014

Publications Récentes

Hi, I can't find any informations about a big input field. I wan't to create a simple formular where the customer can write his own text. But the input field is so small. Is it possible to have a greater one, maybe with mulitple rows?
I've got this at the moment:
<aui:input name="productName" size="450" />

It doesn't have any effect if I change the size to 45000 or 45.. I hope you can understand my problem.

Sincerely yours

JC
David H Nebinger
RE: How to have a bigger input field?
24 juillet 2014 05:26
Réponse

David H Nebinger

Community Moderator

Rang: Liferay Legend

Publications: 11100

Date d'inscription: 1 septembre 2006

Publications Récentes

I think you want a text area, not a single input string.

Width is also going to be controlled by CSS, not by your code.
Jerome Comouth
RE: How to have a bigger input field?
29 juillet 2014 06:08
Réponse

Jerome Comouth

Rang: Junior Member

Publications: 25

Date d'inscription: 7 avril 2014

Publications Récentes

Thank you for the answer.
I changed it to textarea. But I can't find a possibility to get the input out of this field. At the moment I have:
 1<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>
 2
 3<input type="text" id="some-input" />
 4
 5<aui:script>
 6YUI().use(
 7  'aui-form-textarea',
 8  function(Y) {
 9    new Y.CharCounter(
10      {
11        input: '#some-input'
12      });
13  }
14);
15</aui:script>


I don't know if this is right. I can't find any informations about 'aui-form-textarea' here.
What do I have to do, if I want to use the text in the textarea?
Kyle Joseph Stiemann
RE: How to have a bigger input field?
29 juillet 2014 06:41
Réponse

Kyle Joseph Stiemann

LIFERAY STAFF

Rang: Expert

Publications: 437

Date d'inscription: 14 janvier 2013

Publications Récentes

Hi Mr. Jimmy,
If you still want to take advantage of aui:input while using a textarea, you can use <aui:input type="textarea" ... />. As for getting the input from the textarea, are you talking about getting the input on the server, on the client, or both? The Writing the My Greeting Portlet page explains how to get input values on the server. On the client, you should use A.one(#myInputId).get('value').

- Kyle
Jerome Comouth
RE: How to have a bigger input field?
31 juillet 2014 02:55
Réponse

Jerome Comouth

Rang: Junior Member

Publications: 25

Date d'inscription: 7 avril 2014

Publications Récentes

Thank you both, its working now with this code:
 1
 2<div id="contentBox">
 3    <aui:form action="<%=sendCommentMailMethod.toString()%>" method="post">
 4        <aui:fieldset>
 5            <aui:input name="mailText" type="textarea" />
 6            <aui:button-row>
 7                <aui:button id="closeModal" value="Abbrechen" class="btn"></aui:button>
 8                <aui:button type="submit" />
 9            </aui:button-row>
10        </aui:fieldset>
11    </aui:form>
12</div>
Javier Vera
RE: How to have a bigger input field?
22 août 2014 15:57
Réponse

Javier Vera

Rang: New Member

Publications: 18

Date d'inscription: 1 août 2014

Publications Récentes

So Jerome, what you only did was removing all but the type ??