Portal Engine Questions on portal engine and web parts.
Version 7.x > Portal Engine > Async Biz Form View modes: 
User avatar
Certified Developer 10
Certified Developer 10
varinder-kudosweb - 4/29/2013 6:39:12 PM
   
Async Biz Form
Hi,

Is it possible to retain watermark values after a form submission?

Im using jQuery to remove 'value' attribute

code below:
	function pageLoaded(sender, args) {
if (_panels != undefined && _panels.length > 0) {
for (i=0; i < _panels.length; i++) {
_panels.dispose();
}
}

var panels = args.get_panelsUpdated();

if (panels.length > 0) {
_panels = new Array(panels.length);

for (i=0; i < panels.length; i++) {

_panels = new Sys.UI.Control(panels);

var $formContainer = $(_panels._element).closest(".form");
$formContainer.addClass("show-thankyou");

$formContainer.find("input[type='text']").removeAttr("value");
}
}
}

thanks,
Varinder

User avatar
Kentico Consulting
Kentico Consulting
Kentico_RichardS - 5/2/2013 12:51:30 AM
   
RE:Async Biz Form
Hi,

Could you please be more specific of what exactly are you trying to achieve? Im not really sure what that is.

Why do you want to remove value attribute from textboxes of form? Or do you want them just to be clear?

Kind regards,
Richard Sustek

User avatar
Certified Developer 10
Certified Developer 10
varinder-kudosweb - 5/2/2013 5:13:16 PM
   
RE:Async Biz Form
Hi,

Sorry, details below:

- Theres a biz form with watermarked fields (with "ajax update panel" enabled)
- Using Javascript to show thankyou message once the message has been submitted

Everything works fine, but after submission, field values are not cleared.
To reset fields values i tried removing "value" attribute from the field but it removes watermark values too

So, i was wondering if theres a way to reset the form after submission, and show watermark values

Cheers
Varinder

User avatar
Kentico Consulting
Kentico Consulting
Kentico_RichardS - 5/3/2013 1:00:58 AM
   
RE:Async Biz Form
Hi Varinder,

What exactly watermark values are you referring to?

Anyway - to clear a form in jQuery you can use something like the code below:

$('#myForm')[0].reset();


which will clear the entire form.

Kind regards,
Richard Sustek