Foren

How to autofill Web forms Field ?

Imran Khalil, geändert vor 11 Jahren.

How to autofill Web forms Field ?

Junior Member Beiträge: 36 Beitrittsdatum: 22.10.12 Neueste Beiträge
Hey All,
I want to know if it is possible to mail the email address of person who is contacting? Like i am login with imran.kahlil and i want that when i navigate to contact us form. The email field is auto filled or in other case just send email address in mail body...

Any Help!
thumbnail
Gaurav Jain, geändert vor 11 Jahren.

RE: How to autofill Web forms Field ?

Regular Member Beiträge: 145 Beitrittsdatum: 31.01.11 Neueste Beiträge
Imran Khalil:
Hey All,
I want to know if it is possible to mail the email address of person who is contacting? Like i am login with imran.kahlil and i want that when i navigate to contact us form. The email field is auto filled or in other case just send email address in mail body...

Any Help!



IMO you can extend web-form portlet (as its an external plugin which can be extended) to meet your requirement.
Infact best way would be to create a new control field - say AutoFillEmail.
And when you keep this type of field in your web-form, it will be automatically filled by the email-id of the logged-in user (ofcourse you have to code this in your extendecd web-form); and for guest users it will still be blank.
Imran Khalil, geändert vor 11 Jahren.

RE: How to autofill Web forms Field ?

Junior Member Beiträge: 36 Beitrittsdatum: 22.10.12 Neueste Beiträge
How can i extend it in this way... I was trying but didnt get any success emoticon
Milan Kostoláni, geändert vor 11 Jahren.

RE: How to autofill Web forms Field ?

Junior Member Beiträge: 92 Beitrittsdatum: 26.07.12 Neueste Beiträge
Hi,

Check the webform portlet source code and EXT tutorial.
Also write your progress, if you need help with it.
Imran Khalil, geändert vor 11 Jahren.

RE: How to autofill Web forms Field ?

Junior Member Beiträge: 36 Beitrittsdatum: 22.10.12 Neueste Beiträge
I was trying to do it, But didnt get anything related it.. Can you plz provide me with some links?
Milan Kostoláni, geändert vor 11 Jahren.

RE: How to autofill Web forms Field ?

Junior Member Beiträge: 92 Beitrittsdatum: 26.07.12 Neueste Beiträge
Check these for EXT : http://www.liferay.com/community/wiki/-/wiki/Main/Development+in+the+ext+environment
http://www.liferay.com/documentation/liferay-portal/6.0/development/-/ai/creating-an-ext-plugin
https://www.liferay.com/community/wiki/-/wiki/Main/Ext+Plugin

and SVN for WebForm: http://svn.liferay.com/repos/public/plugins/branches/6.1.x/portlets/web-form-portlet/
login with guest and no password
Imran Khalil, geändert vor 11 Jahren.

RE: How to autofill Web forms Field ?

Junior Member Beiträge: 36 Beitrittsdatum: 22.10.12 Neueste Beiträge
Hi, I had tried but didnt got...

What i actually want is something is like this http://www.liferay.com/request-a-demo form...
Milan Kostoláni, geändert vor 11 Jahren.

RE: How to autofill Web forms Field ? (Antwort)

Junior Member Beiträge: 92 Beitrittsdatum: 26.07.12 Neueste Beiträge
There is an option that you make your own portlet and just load users information like this
User u = themeDisplay.getUser();


or that EXT, in which you need to know Web Forms source, well you can just check JSP and remake them
Imran Khalil, geändert vor 11 Jahren.

RE: How to autofill Web forms Field ?

Junior Member Beiträge: 36 Beitrittsdatum: 22.10.12 Neueste Beiträge
Milan Kostoláni:
There is an option that you make your own portlet and just load users information like this
User u = themeDisplay.getUser();


or that EXT, in which you need to know Web Forms source, well you can just check JSP and remake them


Thanks, I am getting to Edit it but I dont have themedisplay there? How can i get user name and email address?
Imran Khalil, geändert vor 11 Jahren.

RE: How to autofill Web forms Field ?

Junior Member Beiträge: 36 Beitrittsdatum: 22.10.12 Neueste Beiträge
Thanks alot man,

Got it and Done it emoticon
Milan Kostoláni, geändert vor 11 Jahren.

RE: How to autofill Web forms Field ?

Junior Member Beiträge: 92 Beitrittsdatum: 26.07.12 Neueste Beiträge
No problem and I think that you had not included init.jsp ( the jsp with all required imports )

BTW Did you created hook/ext or new portlet?
Imran Khalil, geändert vor 11 Jahren.

RE: How to autofill Web forms Field ?

Junior Member Beiträge: 36 Beitrittsdatum: 22.10.12 Neueste Beiträge
I had created new portlet with existing source code...

Eclipse showing error in init.jsp file on following line but compiles fine emoticon
<%@ taglib uri="http://liferay.com/tld/aui" prefix="aui" %>