Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Karthik V S
Add new field in create_account.jsp through Hook in Liferay 6.1
September 15, 2012 3:32 AM
Answer

Karthik V S

Rank: Regular Member

Posts: 102

Join Date: December 21, 2011

Recent Posts

Hi,

I want to add new custom field in create_account.jsp inbuilt portlet. I added custom field through Control Panel. I want that newly created custom portlet in create_account.jsp page. I was thinking of creating new row through AUI tage in create_account.jsp page, but I am not able to get the class related to that.

Help is appreciated.

Thanks in Advance.
Hitoshi Ozawa
RE: Add new field in create_account.jsp through Hook in Liferay 6.1
September 15, 2012 6:21 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Custom field corresponds to Expando classes. Do a search on Expando to find classes and information on using it.
Paul Butenko
RE: Add new field in create_account.jsp through Hook in Liferay 6.1
September 18, 2012 1:40 AM
Answer

Paul Butenko

Rank: Junior Member

Posts: 38

Join Date: July 1, 2010

Recent Posts

Hi,
check this post it is describes how to extend registration page.
BR
Mazhar Alam
RE: Add new field in create_account.jsp through Hook in Liferay 6.1
September 18, 2012 2:22 AM
Answer

Mazhar Alam

Rank: Regular Member

Posts: 201

Join Date: November 25, 2011

Recent Posts

ITs better to create a hook for that..in which you can add your custom fields in your jsp page..
..
Karthik V S
RE: Add new field in create_account.jsp through Hook in Liferay 6.1
September 18, 2012 7:42 AM
Answer

Karthik V S

Rank: Regular Member

Posts: 102

Join Date: December 21, 2011

Recent Posts

The post link is not opening at all. can you suggest some alternative solution for that.

Thanks and Regards
Karthik V S
RE: Add new field in create_account.jsp through Hook in Liferay 6.1
September 18, 2012 8:03 AM
Answer

Karthik V S

Rank: Regular Member

Posts: 102

Join Date: December 21, 2011

Recent Posts

Hi

Thanks for the information, but can I know where exactly the Expando classes in Hook.
kaleem ansari
RE: Add new field in create_account.jsp through Hook in Liferay 6.1
May 16, 2013 9:19 PM
Answer

kaleem ansari

Rank: New Member

Posts: 21

Join Date: March 23, 2013

Recent Posts

i seen the post and i did same but unable tto store mobile number field value in database. can u explain me the where should i find the extra added field data base


2.in this he did by using ext-plugin ,but i want to use hook can u suggest the exact example.
akaram siddiqui
RE: Add new field in create_account.jsp through Hook in Liferay 6.1
May 16, 2013 11:59 PM
Answer

akaram siddiqui

Rank: Junior Member

Posts: 36

Join Date: May 15, 2013

Recent Posts

add custom attribute in create_account.jsp page


Step .1 login to liferay =>go to the control panel =>go to the portal=>click on custom field =>click on user then click on add custom field and fill in billow key

user_joining and in Type select Date click on save button

Now click on action button right side and give permission for guest tick on update and view check box.

Step .2 coppy create_account.jsp from source folder of your liferay and put it in your hook which you have created for
customize the page means put the following code billow the </aui:fieldset>


the code is :


<liferay-ui:custom-attribute-list

className="com.liferay.portal.model.User"

classPK="<%= 01 %>"

editable="<%= true %>"

label="<%= true %>"
/>
now ant build your create_account.jsp page and go to the create_account page through liferay login page refresh your page you will see your custom attribute field.
Pradip A Bhatt
RE: Add new field in create_account.jsp through Hook in Liferay 6.1
February 27, 2014 9:11 PM
Answer

Pradip A Bhatt

Rank: Junior Member

Posts: 51

Join Date: January 29, 2013

Recent Posts

Hello All,
I am using Liferay 6.1 CE version. I added my custom attribute in User entity from control panel. I want to add this my custom field in create_account.jsp hook page. I added like this way.

<div class="exp-ctrl-holder">
<liferay-ui:custom-attribute className="<%=User.class.getName()%>"
classPK="<%=0%>" editable="<%=true%>" label="<%=true%>"
name="user-default-group-name" />

After that i am trying to getting this value in UserLocalService hook class which extends UserLocalServiceWrapper class - (hook). I find each value from this but can not able to get my custom field value.

I am trying to get custom field value like this.

String defaultGroup = (String) User.getExpandoBridge().getAttribute("defaultGroupName");
log.info("Default Group Name :" + defaultGroup);

But I am getting null value or default value which I set at the time of adding custom attribute. I can not find my entered value from jsp page.

Please help me.

Regards :
Pradip Bhatt
pradip.bhatt@aspiresoftware.in
Manav Sharma
RE: Add new field in create_account.jsp through Hook in Liferay 6.1
June 4, 2015 2:42 AM
Answer

Manav Sharma

Rank: New Member

Posts: 10

Join Date: May 10, 2015

Recent Posts

hello ,
i am new to liferay i am creating a hook to modify the create account jsp file . i already have created a mobile nos filed in custom field section and able to see it also in create account form .

can anyone tell me how to add validation to mobile field.
Manav Sharma
RE: Add new field in create_account.jsp through Hook in Liferay 6.1
June 11, 2015 9:38 PM
Answer

Manav Sharma

Rank: New Member

Posts: 10

Join Date: May 10, 2015

Recent Posts

Manav Sharma:
hello ,
i am new to liferay i am creating a hook to modify the create account jsp file . i already have created a mobile nos filed in custom field section and able to see it also in create account form .

can anyone tell me how to add validation to mobile field.



i used jqx validator for providing validation to custom fields and it worked.