Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1046863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T16:12:45+00:00 2026-05-16T16:12:45+00:00

I am using Zend_Form and I would like one of my elements to not

  • 0

I am using Zend_Form and I would like one of my elements to not escape. I have the following code, I think it should not escape but it does without fail:

In form class:

    $btc_name = $this->createElement('text','btc_name');
    $btc_name->setLabel('Company Name')
        ->setRequired(true)
        ->setAttrib('size',45)
        ->setAttrib('escape',false)
        ->addFilter('StripTags')
        ->addFilter('StringTrim')
        ->addValidator('NotEmpty');

Output html:

<dt id="btc_name-label"><label for="btc_name" class="required">Company Name</label></dt> <dd id="btc_name-element"><input type="text" name="btc_name" id="btc_name" value="Joe\'s Tire Warehouse" size="45" /></dd>

You can see the form in action with a print_r of the $formData and getValue of the field here: Link Removed

Any help would be greatly appreciated.

Thanks,
Joe Chin

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T16:12:45+00:00Added an answer on May 16, 2026 at 4:12 pm

    Assuming it’s the backslash you’re referring to, it’s likely to be PHP that’s adding this, not Zend Framework. Check your php.ini file and look for a setting called magic_quotes_gpc – you want this to be off (unless you have other things relying on it). If you can’t alter your php.ini file but are using mod_php, you can override this in a .htaccess file:

    php_value magic_quotes_gpc off
    

    See http://php.net/manual/en/security.magicquotes.php for some background, and why it is bad.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Zend_Form, how would I create form elements like this <input type=text name=element[1] value=/>
Using Zend_Form, how would I create form elements like this: <input type=text name=element[1] value=
Using Zend_Form, how would I create form elements like this: <input type=text name=element[0][name] value=
About to create a form using Zend Form, all the form elements should have
I am creating a Zend Form using Dojo elements and I would like to
I am using an XML config file to tell Zend_Form what elements I want.
I would like to get to grips with Zend Framework 2 by using it
I have a database with a simple one-to-many relationship that looks like this: Tables
I'm using Zend_Form for handling a form and I have a problem with localization.
I have a form and I would like to customise the markup for it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.