Liferay is a Gartner Magic Quadrant Leader for the Sixth Year! Find out why

Web Forms Portlet

Note: this feature has been added in Liferay Portal 4.3

Introduction #

The web forms portlet is a tool that allows a web administrator to define a form to be published in the website. Users visiting the website can then fill the form which is then sent to a configured email address or saved (to file or to database).

Attached are two screenshots to see how the portlet looks like in view and edit configuration modes.

Features #

  • The title and introductory description of the form shown to the users are configurable
  • The email address and subject of the email is also configurable per form
  • It is possible to have as many different forms per website and page as desired (Instanceable portlet)
  • Three types of fields: text, text box and select box
  • Save to database
  • Export to CSV file

Limitations and future work #

Following is a list of known limitations that might be solved in the future:

  • "Export do file" sections is seen only after someone fills that form.
  • A fixed number of max fields must be configured at deployment time (in portlet.xml). This should be expanded so that there is no max. limit and new fields can be added through the UI
  • Three types of fields: text, text box and select box
  • Not internationalizable: it's not possible to have the form title, form description and field labels in several languages
  • (at least in 5.2.3) Mandatory Fields should not contain spaces in their label

Other improvements that might be done are:

  • Support more field types
  • Show statistics about the answers (requires previous feature)
  • Email to multiple contacts (comma or colon-separated list)

References #

  • http://support.liferay.com/browse/LEP-2558
2 Attachments
97945 Views
Average (4 Votes)
The average rating is 1.75 stars out of 5.
Comments
Threaded Replies Author Date
Ad more filed types: It could be useful to have... Milan Jaroš December 30, 2008 2:35 AM
can we set email address based on user input? delang j February 15, 2009 7:03 PM
# Store the answers in a database It stores... Auditya manikanta Vadrevu July 14, 2009 2:04 AM
Auditya - yes, it stores the answers into the... David Hunter May 18, 2010 12:46 PM
David, I'm using Liferay 5.2. Under "portlet... Péter Kormos August 2, 2010 12:51 PM
Why are the addresses of sender and recipient... Matus Ferko August 19, 2009 3:24 AM
Agree coffy, there should be checkbox send a... Suresh Nimmakayala September 23, 2009 2:40 PM
There's an open issue. ... Kirk Stork January 5, 2011 5:32 PM
Should be a field type that saves the username... Eduardo Roldan April 28, 2010 12:02 AM
Hi.. I want to know how can i add new buttons... ankit yakkundi September 27, 2010 5:30 AM
Should allow to add additional text form fields. Manuel Hoyos April 11, 2013 11:25 PM
Is is possible to increase question length? Now... Raquel Brown October 13, 2013 8:52 AM

Ad more filed types: It could be useful to have support for <input type="file"/>.
Posted on 12/30/08 2:35 AM.
can we set email address based on user input?
Posted on 2/15/09 7:03 PM.
# Store the answers in a database

It stores in database in expandotable,expandocolumn,expandorow,expandovalue.
Posted on 7/14/09 2:04 AM.
Why are the addresses of sender and recipient the same? There should some way to set up sender e-mail address.
Posted on 8/19/09 3:24 AM.
Agree coffy, there should be checkbox send a copy to sender ? like that
Posted on 9/23/09 2:40 PM in reply to Matus Ferko.
Should be a field type that saves the username (if authenticated) of the person filling the form.
Posted on 4/28/10 12:02 AM.
Auditya - yes, it stores the answers into the Expando tables - however how do you extract the data for viewing ?
Posted on 5/18/10 12:46 PM in reply to Auditya manikanta Vadrevu.
David,

I'm using Liferay 5.2.
Under "portlet configuration", there are two tabs, "General" and "Form Fileds".
First make sure, that "Save to Database" is enabled under "General".
Then after a couple of form submits, go to
"Form Fileds" tab, and there's an "Export Data" button. That would get you a CSV with all the form data submitted so far.

You might try "Save to File" as well, that would generate the same CSV on the disc.

HTH,

Peter
Posted on 8/2/10 12:51 PM in reply to David Hunter.
Hi..
I want to know how can i add new buttons on the web form portlet like save,delete,etc.Which should work as name suggest.
Posted on 9/27/10 5:30 AM.
There's an open issue. http://issues.liferay.com/browse/LEP-7196

But having been filed in 2008, I gather nobody cares too much about this.

It seems to me the sender should either be configurable or use the same sender information used for other Portal-generated emails, like new account notifications and such.
Posted on 1/5/11 5:32 PM in reply to Matus Ferko.
Should allow to add additional text form fields.
Posted on 4/11/13 11:25 PM.
Is is possible to increase question length? Now it's limited to 75 characters.
Posted on 10/13/13 8:52 AM.