Forums

Home » Liferay Portal » English » 2. Using Liferay » General

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Zeeshan Khan
webform refresh problem
November 16, 2011 2:14 AM
Answer

Zeeshan Khan

Rank: Expert

Posts: 349

Join Date: July 20, 2011

Recent Posts

Hi All !!

I have a WEBFORM with some fields(PFA). The problem is whenever any user is providing the data in the fields and after clicking the send button, the data remains in there....and if i refresh the page, it automatically sends the data to the configured Email id. Plz help me in this as i dont want to send the data again and want to keep clear the fields after clicking the SEND button.

PFA

thnx !!
Attachment

Attachments: cnt.png (165.8k)
Jignesh Vachhani
RE: webform refresh problem
November 16, 2011 9:25 PM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 780

Join Date: March 10, 2008

Recent Posts

For that you need to validate form on submission of action when you are refreshing the form.
So you need to change the web form portlet OOB code.

Best,
Jignesh
liferaycms blog
Zeeshan Khan
RE: webform refresh problem
November 16, 2011 4:55 AM
Answer

Zeeshan Khan

Rank: Expert

Posts: 349

Join Date: July 20, 2011

Recent Posts

Jignesh Vachhani:
For that you need to validate form on submission of action when you are refreshing the form.
So you need to change the web form portlet OOB code.


Hi JIgnesh !!

thnx 4 replying....where to make changes, i mean in which should i make changes......????

thnx !!
Tejas Kanani
RE: webform refresh problem
November 16, 2011 6:38 PM
Answer

Tejas Kanani

Rank: Liferay Master

Posts: 653

Join Date: January 6, 2009

Recent Posts

Hi Zeeshan,

You need to make change in webform-portlet's view.jsp
There is one aui script call at the bottom of the file.

<aui:script use="aui-base,selector-css3">
var form = A.one('#<portlet:namespace />fm');

if (form) {
. .
. .
. .


it is being called when we click on Submit button. So you can add a logic to clear all the fields via javascript after Submit logic. So that every time you will get blank fields.

Regards,
Tejas Kanani
Deploy Liferay to Jelastic Cloud
Zeeshan Khan
RE: webform refresh problem
November 17, 2011 4:55 AM
Answer

Zeeshan Khan

Rank: Expert

Posts: 349

Join Date: July 20, 2011

Recent Posts

Hi Tejas n thnx 4 replying...

1 more thing...the that is attached with ur signature "Deploy Liferay to Jelastic Cloud", what if i want to deploy here...??? i have developed in LR 6.0.6 bundled with Tomcat....on that link u have shown using LR 6.1 BETA....so what modifications do i need...?? Moreover it is talking about deploying as WAR and we have developed in JEDI theme and using Liferay components like,WEBFORM,CHAT-PORTLET,WEB CONTENT DISPLAY,MAIL PORTLET......

thnx !!!
Tejas Kanani
RE: webform refresh problem
November 17, 2011 6:19 AM
Answer

Tejas Kanani

Rank: Liferay Master

Posts: 653

Join Date: January 6, 2009

Recent Posts

Thanks Zeeshan for showing interest in Jelastic.

You can deploy Liferay 6.0.6 as well. There will not be any major change. Just we need to use respective war of Liferay 6.0.6 and dependent jars.
I've also prepare Liferay 6.0.6 instance as well. Check this Liferay 6.0.6

And regarding plugins portlet deployment, I think we can deploy it from Plugins installer from Control Panel. It's working fine.

I've not checked with custom plugins portlet deployment. We'll try it and let you know the updates.

Thanks,
Tejas Kanani
Zeeshan Khan
RE: webform refresh problem
November 17, 2011 11:13 PM
Answer

Zeeshan Khan

Rank: Expert

Posts: 349

Join Date: July 20, 2011

Recent Posts

Hi Tejas !!

i just visited ur link for liferay6.06....great work...

plz let me know how to deploy my tomcat bundle on this Jelastic...

thnx !!
Jignesh Vachhani
RE: webform refresh problem
November 18, 2011 12:53 AM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 780

Join Date: March 10, 2008

Recent Posts

you can download lifeay portal war file from the site and can deploy directly on the server(upload option is available on jelastic account ).
Also you will have to add some dependency files which needed to run the application so you can download those jar files and can put it into lib folder of jelastic account which you have created.

HTH,
Jignesh
Zeeshan Khan
RE: webform refresh problem
November 18, 2011 1:02 AM
Answer

Zeeshan Khan

Rank: Expert

Posts: 349

Join Date: July 20, 2011

Recent Posts

Jignesh Vachhani:
you can download lifeay portal war file from the site and can deploy directly on the server(upload option is available on jelastic account ).
Also you will have to add some dependency files which needed to run the application so you can download those jar files and can put it into lib folder of jelastic account which you have created.

HTH,
Jignesh


yeah Jignesh....earlier u gave me some idea about how to deploy my complete tomcat folder.....thnx for that...i will be deploying very soon....here u are talking about downloading war from which site Jignesh...??

thnx !!
Jignesh Vachhani
RE: webform refresh problem
November 18, 2011 1:06 AM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 780

Join Date: March 10, 2008

Recent Posts

Tejas Kanani
RE: webform refresh problem
November 18, 2011 2:00 AM
Answer

Tejas Kanani

Rank: Liferay Master

Posts: 653

Join Date: January 6, 2009

Recent Posts

Zeeshan Khan:
yeah Jignesh...earlier u gave me some idea about how to deploy my complete tomcat folder


Hi Jignesh,

Can we deploy complete tomcat folder inside jelastic ?
It would be good if you please share how can we do that.

Thanks,
Tejas Kanani
Tejas Kanani
RE: webform refresh problem
November 18, 2011 2:04 AM
Answer

Tejas Kanani

Rank: Liferay Master

Posts: 653

Join Date: January 6, 2009

Recent Posts

Zeeshan Khan:
Hi Tejas !!

i just visited ur link for liferay6.06....great work...

plz let me know how to deploy my tomcat bundle on this Jelastic...

thnx !!


Hi Zeeshan,

Please visit below links. Uploaded some more useful details.
Video of Liferay in the Cloud, by Jelastic
Deploy custom war in Liferay hosted in Jelastic
Deploy Liferay to Jelastic Cloud

Regards,
Tejas Kanani
OpenSourceForLife
Jignesh Vachhani
RE: webform refresh problem
November 20, 2011 9:33 PM
Answer

Jignesh Vachhani

Rank: Liferay Master

Posts: 780

Join Date: March 10, 2008

Recent Posts

Hi Tejas,

No in jelastic we cant put complete tomcat folder,
Zeeshan is talking here about the problem which we resolved previously.
For jelastic deployment we must have to deploy tomcat war and dependencies.
Zeeshan Khan
RE: webform refresh problem
November 21, 2011 2:18 AM
Answer

Zeeshan Khan

Rank: Expert

Posts: 349

Join Date: July 20, 2011

Recent Posts

Jignesh Vachhani:
Hi Tejas,

No in jelastic we cant put complete tomcat folder,
Zeeshan is talking here about the problem which we resolved previously.
For jelastic deployment we must have to deploy tomcat war and dependencies.


yeah Jignesh....i was asking about deploying the whole tomcat folder in Jelastic.....
Tejas Kanani
RE: webform refresh problem
November 21, 2011 5:55 AM
Answer

Tejas Kanani

Rank: Liferay Master

Posts: 653

Join Date: January 6, 2009

Recent Posts

Thanks Jignesh for the clarification,

I thought that there is some other way which you may have gone through.
But never mind, what we have so far is not that bad emoticon. We can still go ahead with what we have.

Zeeshan Khan:
yeah Jignesh....i was asking about deploying the whole tomcat folder in Jelastic.....

Hi Zeeshan,
As per Jignesh's comment and as far I know, deploying entire tomcat is not the better way and its not possible as of now in Jelastic.
Rather you should setup fresh instance and deploy your custom portlet/theme one by one.

Thanks,
Tejas Kanani
OpenSourceForLife
Ranga Rao Bobbili
RE: webform refresh problem
March 2, 2012 4:25 AM
Answer

Ranga Rao Bobbili

Rank: Regular Member

Posts: 148

Join Date: July 20, 2007

Recent Posts

<aui:script use="aui-base,selector-css3">
var form = A.one('#<portlet:namespace />fm');

if (form) {
. .
. .
. .

my side script(Tejas Khanani) is also not working. so we created one patch for view.jsp. Patch is working fine from my side.
Environment
Liferay portal version 6.0.6
Attachments: view.jsp (10.5k)
Amit Doshi
RE: webform refresh problem
April 4, 2012 12:52 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 544

Join Date: December 29, 2010

Recent Posts

Hi Ranga,

You can do change with the help of jquery directly in theme or in webform portlet.

I made changes in theme code and added the following line to clear the field and it worked for me .

1
2<script type="text/javascript">
3$(document).ready( function(){
4    $(webFormPortlet).find(".aui-fieldset-content").find(".aui-field-input-text").val("");
5});
6</script>


Hope it helps.

Thanks & Regards,
Amit Doshi
Zeeshan Khan
RE: webform refresh problem
April 9, 2012 9:52 PM
Answer

Zeeshan Khan

Rank: Expert

Posts: 349

Join Date: July 20, 2011

Recent Posts

amit doshi:
Hi Ranga,

You can do change with the help of jquery directly in theme or in webform portlet.

I made changes in theme code and added the following line to clear the field and it worked for me .

1
2<script type="text/javascript">
3$(document).ready( function(){
4    $(webFormPortlet).find(".aui-fieldset-content").find(".aui-field-input-text").val("");
5});
6</script>


Hope it helps.

Thanks & Regards,
Amit Doshi





Hi Amit !!

where u added this...?? in theme's portal_normal.vm ???
Amit Doshi
RE: webform refresh problem
April 10, 2012 12:16 AM
Answer

Amit Doshi

Rank: Liferay Master

Posts: 544

Join Date: December 29, 2010

Recent Posts

Hi Zeeshan,

I changed in theme part.

According to our requirement we placed the WebForm Portlet in the footer of the all the pages.

So in the footer.vm at the bottom I had written following script.

 1
 2
 3<script type="text/javascript">
 4$(document).ready( function(){
 5var footerForm = $("#footer_form_area");    // The following is my footer portion id. in your code it might be different one.
 6   
 7    if($(footerForm).length){
 8        var webFormPortlet = $(footerForm).find("#_1_WAR_webformportlet_INSTANCE_9TOw_fm");    // As webform portlet is instanciable . so u might be having different last four number [b]9TOw[/b]
 9       
10        if($(webFormPortlet).length){
11                    $(webFormPortlet).find(".aui-fieldset-content").find(".aui-field-input-text").val("");
12               }
13        }
14});
15</script>


Hope it helps.

Thanks & Regards,
Amit Doshi
Zeeshan Khan
RE: webform refresh problem
April 10, 2012 12:33 AM
Answer

Zeeshan Khan

Rank: Expert

Posts: 349

Join Date: July 20, 2011

Recent Posts

thnx amit.... emoticon