Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Ekta Vegad
Custom Field
September 2, 2012 9:26 PM
Answer

Ekta Vegad

Rank: New Member

Posts: 10

Join Date: August 5, 2012

Recent Posts

hello,
I have created one ext for displaying one more option on users form when creating account in miscellaneous section
in that I want to display 2 custom fields in one row.
I have written code for first field like:

<aui:fieldset>
<div>
<liferay-ui:custom-attribute
className="com.liferay.portal.model.User"
classPK="<%= (selUser != null) ? selUser.getUserId() : 0 %>"
editable="<%= true %>"
label="<%= true %>"
name="firstname"
/>
</div>
</aui:fieldset>

for second field in same row should I again needs to write same code?

Should I needs to use "Group of Text Values" as custom-field ?
Sagar A Vyas
RE: Custom Field
September 1, 2012 2:51 AM
Answer

Sagar A Vyas

Rank: Liferay Master

Posts: 657

Join Date: April 17, 2009

Recent Posts

Hi Ekata,

Yes of course you have to add one more entry for same.

For ex.

 1
 2
 3<aui:fieldset>
 4    <div class="ctrl-holder">
 5        <liferay-ui:custom-attribute
 6            className="com.liferay.portal.model.User"
 7            classPK="<%= (selUser != null) ? selUser.getUserId() : 0 %>"
 8            editable="<%= true %>"
 9            label="<%= true %>"
10            name="library-id"
11        />
12    </div>
13
14    <div class="ctrl-holder">
15        <liferay-ui:custom-attribute
16            className="com.liferay.portal.model.User"
17            classPK="<%= (selUser != null) ? selUser.getUserId() : 0 %>"
18            editable="<%= true %>"
19            label="<%= true %>"
20            name="favorite-books"
21        />
22    </div>
23</aui:fieldset>


And also you have to add properties for same.

Thanks,
Sagar Vyas
Ekta Vegad
RE: Custom Field
September 2, 2012 9:26 PM
Answer

Ekta Vegad

Rank: New Member

Posts: 10

Join Date: August 5, 2012

Recent Posts

hello sir,
I have added new field but I want it in one row

but now I have solved this query by adding this fields in <table> so that it is displayed in one row

thank you.