Forums de discussion

Add new field in create_account.jsp through Hook in Liferay 6.1

thumbnail
Karthik V S, modifié il y a 11 années.

Add new field in create_account.jsp through Hook in Liferay 6.1

Regular Member Publications: 106 Date d'inscription: 21/12/11 Publications récentes
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.
thumbnail
Hitoshi Ozawa, modifié il y a 11 années.

RE: Add new field in create_account.jsp through Hook in Liferay 6.1

Liferay Legend Publications: 7942 Date d'inscription: 24/03/10 Publications récentes
Custom field corresponds to Expando classes. Do a search on Expando to find classes and information on using it.
thumbnail
Karthik V S, modifié il y a 11 années.

RE: Add new field in create_account.jsp through Hook in Liferay 6.1

Regular Member Publications: 106 Date d'inscription: 21/12/11 Publications récentes
Hi

Thanks for the information, but can I know where exactly the Expando classes in Hook.
Paul Butenko, modifié il y a 11 années.

RE: Add new field in create_account.jsp through Hook in Liferay 6.1

Junior Member Publications: 38 Date d'inscription: 02/07/10 Publications récentes
Hi,
check this post it is describes how to extend registration page.
BR
thumbnail
Karthik V S, modifié il y a 11 années.

RE: Add new field in create_account.jsp through Hook in Liferay 6.1

Regular Member Publications: 106 Date d'inscription: 21/12/11 Publications récentes
The post link is not opening at all. can you suggest some alternative solution for that.

Thanks and Regards
kaleem ansari, modifié il y a 10 années.

RE: Add new field in create_account.jsp through Hook in Liferay 6.1

New Member Publications: 21 Date d'inscription: 24/03/13 Publications récentes
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.
thumbnail
Mazhar Alam, modifié il y a 11 années.

RE: Add new field in create_account.jsp through Hook in Liferay 6.1

Regular Member Publications: 191 Date d'inscription: 25/11/11 Publications récentes
ITs better to create a hook for that..in which you can add your custom fields in your jsp page..
..
akaram siddiqui, modifié il y a 10 années.

RE: Add new field in create_account.jsp through Hook in Liferay 6.1

Junior Member Publications: 56 Date d'inscription: 16/05/13 Publications récentes
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.
thumbnail
Pradip A Bhatt, modifié il y a 10 années.

RE: Add new field in create_account.jsp through Hook in Liferay 6.1

Junior Member Publications: 51 Date d'inscription: 29/01/13 Publications récentes
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
thumbnail
Manav Sharma, modifié il y a 8 années.

RE: Add new field in create_account.jsp through Hook in Liferay 6.1

New Member Publications: 13 Date d'inscription: 10/05/15 Publications récentes
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.
thumbnail
Manav Sharma, modifié il y a 8 années.

RE: Add new field in create_account.jsp through Hook in Liferay 6.1

New Member Publications: 13 Date d'inscription: 10/05/15 Publications récentes
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.