Forums / General Questions / Add parameters to zen_draw_textarea_field() without emptying field

Add parameters to zen_draw_textarea_field() without emptying field

Views: 529

Results 1 to 3 of 3
2 Mar 2013, 8:46 PM
#1
wolfderby avatar

wolfderby

Zen Follower

Join Date:
Dec 2008
Location:
Pittsburgh, PA
Posts:
241
Plugin Contributions:
0

Add parameters to zen_draw_textarea_field() without emptying field

<?php echo zen_draw_textarea_field('comments', '45', '3', $_SESSION['comments'],'accesskey="n"'); ^is the "$_SESSION['comments']" part of that dangerous or a security flaw to do? I want to add the accesskey anchor tag attribute to the comments box in the checkout without "dropping" (overwriting with blank), the comment box context between the shipping page and the payment page... when I have... <?php echo zen_draw_textarea_field('comments', '45', '3', ,'accesskey="n"'); or <?php echo zen_draw_textarea_field('comments', '45', '3', '','accesskey="n"'); it redraws the field as empty, and I loose any form data entered on the first check out step. Thanks, b
5 Mar 2013, 6:24 AM
#2
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Add parameters to zen_draw_textarea_field() without emptying field

wolfderby:

<?php echo zen_draw_textarea_field('comments', '45', '3', $_SESSION['comments'],'accesskey="n"'); ^is the "$_SESSION['comments']" part of that dangerous or a security flaw to do?

No. This input gets sanitised before use.

wolfderby:

when I have...

<?php echo zen_draw_textarea_field('comments', '45', '3', ,'accesskey="n"'); it redraws the field as empty, and I loose any form data entered on the first check out step.

The reason it redraws as empty is because you've removed the $_SESSION['comments'] field.

Cheers
Rod

NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.

8 Jun 2014, 12:27 AM
#3
wolfderby avatar

wolfderby

Zen Follower

Join Date:
Dec 2008
Location:
Pittsburgh, PA
Posts:
241
Plugin Contributions:
0

Re: Add parameters to zen_draw_textarea_field() without emptying field

Thanks!