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

  • SEARCH
  • Home
  • 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 1101217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T01:00:11+00:00 2026-05-17T01:00:11+00:00

When creating form elements with Zend (using Zend Studio for Eclipse), I’d like some

  • 0

When creating form elements with Zend (using Zend Studio for Eclipse), I’d like some auto completion or hints. Here’s what I’m thinking. I’m sure these exist, but I don’t know how to get them.

  • I type createElement and auto-completes gives me the signature createElement($type, $name). Great, I select it.

  • but when I try to set the $type I don’t get any hints like DateTextBox or ValidationTextBox. Being new, I see how this can be useful. What do you do to remember all the options?

  • for the array of attributes like require, invalidMessage, I’d like to get a list of those to choose from, and/or auto-complete when I start typing one.

    // Date field

    $date = $this->createElement('DateTextBox', 'date',

    array('require' => 'true', 'invalidMessage' => 'Invalid date format')

    );

    $date->setLabel('date')->setRequired(true);

  • 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-17T01:00:12+00:00Added an answer on May 17, 2026 at 1:00 am

    You have few options to help yourself, without waiting for any plugin:

    • learn it and remember 😉
    • extend your phpDoc blocks with all available options:

    Example (to be honest I don’t know if Eclipse supports html in phpDoc or even any text after variable name in @param, but it works fine in Netbeans):

    /**
     * [...]
     * @param  string $type Can be: <ul><li>DateTextBox</li><li>ValidationTextBox</li></ul>
     * @param  string $name Whatever
     * @param  array|Zend_Config $options Array with following keys: <ul><li>require</li><li>invalidMessage</li></ul>
     * @return Zend_Form_Element
     */
    public function createElement($type, $name, $options = null)
    
    • extend Zend class and create your own methods to simplify your work

    Example:

    class My_Zend_Form_Element extends Zend_Form_Element    
    {   
        public function createDateTextBox($name, $options = null)
        {
            return $this->createElement('DateTextBox', $name, $options);
        }
    }
    
    • declare some well named constants and provide some hint in phpDoc

    Example: (type ZFE_OPTIONS and IDE should show hint with some constants to use as array keys)

    /**
     * Can be true or false
     */
    define('ZFE_OPTIONS_REQUIRE','require');
    
    • create your own helper classes with methods to produce valid options array

    Example:

    class ZFE_Options
    {
        protected $opts = array();
    
        /**
         * @param bool $req
         * @return ZFE_Options 
         */
        public function setRequired($req){
            $this->opts['require'] = (bool)$req;
            return $this;
        }
    
        /**
         * @param string $txt
         * @return ZFE_Options 
         */
        public function setInvalidMessage($txt){
            $this->opts['invalidMessage'] = (string)$txt;
            return $this;
        }
    
        /**
         * @return array
         */
        public function toArray(){
            return $this->opts;
        }
    }
    
    $zfe_options = new ZFE_Options();
    $opts = $zfe_options
                ->setRequired(true)
                ->setInvalidMessage('Please provide valid email address')
                ->toArray();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a Zend Form using Dojo elements and I would like to
I know for example the Zend Framework has some capability for creating form elements
I am creating checkbox elements in Zend Form like this: $element = $this->CreateElement('checkbox', 'CheckIt');
I am creating a form, using Zend Form. I have 8 input elements. And
I'm using this script http://mondaybynoon.com/2009/02/23/creating-custom-form-elements-using-jquery-selects/ to create custom css select boxes in my page.
I'm creating an email form element like so (inside a Zend Form): //create e-mail
I am creating a custom zend form element that will require some javascript. I
I'm creating a form elements template file in PHPTAL. I would like to be
Eariler I happily used the following code for creating form elements (inside Zend_Form descendant):
I am creating a form using Cake.In the form there is a $this->Form->button($i); element.

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.