Foren

Home » Liferay Portal » English » 3. Development

Kombinierte Ansicht Flache Ansicht Baumansicht
Threads [ Zurück | Nächste ]
toggle
Imran Khalil
How to autofill Web forms Field ?
30. Oktober 2012 23:50
Antwort

Imran Khalil

Rang: Junior Member

Nachrichten: 36

Eintrittsdatum: 21. Oktober 2012

Neue 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!
Gaurav Jain
RE: How to autofill Web forms Field ?
30. Oktober 2012 23:56
Antwort

Gaurav Jain

Rang: Regular Member

Nachrichten: 141

Eintrittsdatum: 31. Januar 2011

Neue 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
RE: How to autofill Web forms Field ?
31. Oktober 2012 00:01
Antwort

Imran Khalil

Rang: Junior Member

Nachrichten: 36

Eintrittsdatum: 21. Oktober 2012

Neue Beiträge

How can i extend it in this way... I was trying but didnt get any success emoticon
Milan Kostoláni
RE: How to autofill Web forms Field ?
5. November 2012 04:53
Antwort

Milan Kostoláni

Rang: Junior Member

Nachrichten: 92

Eintrittsdatum: 26. Juli 2012

Neue Beiträge

Hi,

Check the webform portlet source code and EXT tutorial.
Also write your progress, if you need help with it.
Imran Khalil
RE: How to autofill Web forms Field ?
6. November 2012 01:57
Antwort

Imran Khalil

Rang: Junior Member

Nachrichten: 36

Eintrittsdatum: 21. Oktober 2012

Neue 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
RE: How to autofill Web forms Field ?
6. November 2012 03:34
Antwort

Milan Kostoláni

Rang: Junior Member

Nachrichten: 92

Eintrittsdatum: 26. Juli 2012

Neue 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
RE: How to autofill Web forms Field ?
6. November 2012 04:27
Antwort

Imran Khalil

Rang: Junior Member

Nachrichten: 36

Eintrittsdatum: 21. Oktober 2012

Neue 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
RE: How to autofill Web forms Field ?
7. November 2012 00:45
Antwort

Milan Kostoláni

Rang: Junior Member

Nachrichten: 92

Eintrittsdatum: 26. Juli 2012

Neue Beiträge

There is an option that you make your own portlet and just load users information like this
1User 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
RE: How to autofill Web forms Field ?
7. November 2012 01:15
Antwort

Imran Khalil

Rang: Junior Member

Nachrichten: 36

Eintrittsdatum: 21. Oktober 2012

Neue Beiträge

Milan Kostoláni:
There is an option that you make your own portlet and just load users information like this
1User 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
RE: How to autofill Web forms Field ?
7. November 2012 01:38
Antwort

Imran Khalil

Rang: Junior Member

Nachrichten: 36

Eintrittsdatum: 21. Oktober 2012

Neue Beiträge

Thanks alot man,

Got it and Done it emoticon
Milan Kostoláni
RE: How to autofill Web forms Field ?
7. November 2012 03:49
Antwort

Milan Kostoláni

Rang: Junior Member

Nachrichten: 92

Eintrittsdatum: 26. Juli 2012

Neue 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
RE: How to autofill Web forms Field ?
7. November 2012 03:52
Antwort

Imran Khalil

Rang: Junior Member

Nachrichten: 36

Eintrittsdatum: 21. Oktober 2012

Neue 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" %>