473,406 Members | 2,387 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

setvalue on element form on zend framework

132 100+
I have the issue the name of representative it's not show in my form so my code:my formcusto
Expand|Select|Wrap|Line Numbers
  1. $rep = new Admin_Model_DbTable_Representative();
  2. $representative = new Zend_Form_Element_Text('representative');
  3. $representative->setLabel(Zend_Registry::get('Zend_Translate')->translate('representative'))
  4.                      ->setRequired(true)
  5.                      ->addValidator('notEmpty')
  6.                      ->addFilter('StripTags')
  7.                      ->addFilter('StringTrim')
  8.                      ->setValue(Admin_Models_RepresentativeTools::getRepresentativeNamebyrepresentativecode($rep->getRepresentativeCode()));
  9. $representative->getDecorator(('label'))->setOption('tag', 'span');
  10. $this->addElement($representative);
and on my .phtml
Expand|Select|Wrap|Line Numbers
  1. <div class="row">
  2.     <div class="col-md-2"><?php echo $this->element->representative->renderLabel(); ?></div>
  3.     <div class="col-md-2"><?php echo $this->element->representative->renderViewHelper(); ?></div>   
  4. </div><br>
I have always my code of representative but not the name i have this function :
Expand|Select|Wrap|Line Numbers
  1. $Representative = new Admin_Model_DbTable_Representative();
  2. $represen = $Representative->fetchRow($Representative->select()->where( self::REPRESENTATIVECODE . ' = ? ', $representativecode));
  3. if(!empty($represen))
  4.     //echo'represen:'.var_dump($represen);
  5.     {return $represen->representativename;}
Thanks in advance
Apr 28 '15 #1
0 1088

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: R. Rajesh Jeba Anbiah | last post by:
The Zend framework preview release is out <http://framework.zend.com/> and I don't know why such PEAR like (yet another) framework is needed. At the same time, Rasmus' article...
1
by: pjSoni | last post by:
Hi I would like to know from where to start learning zend frame work I need to develop project based on zend framework so what tools of zend framework I should use like db, template handling...
4
by: chonny | last post by:
How to connect and query odbc database with zend framework db?
0
by: WhatsPHP | last post by:
Hi I have seen the view helper in the Zend Framework. Does anyone know if there is any kind of plan to bring in bring in HTML_QuickForm like validation into the Zend Framework? The view helper...
0
by: hzqij1978 | last post by:
I am a newer of Zend Framework, i write a program to test the speed of Zend Framework, code like this: /var/www/htdocs/index.php <?php require_once 'Zend.php'; require_once...
1
by: enkara | last post by:
Hi!! I'm trying to embebe an event calendar on my website but I'm usign Zend Framework and I don't know how to do it. It seems like Zend Framework doesn't accept third party tools. I don't know...
5
by: Sanders Kaufman | last post by:
I've been programming a long time, but I'm not very bright these days. I've been using Zend Studio for a couple of years (LOVING IT!!) to build a web framework. I've been *hearing* about a...
3
by: Peter Wang | last post by:
Hi, all. I recently encountered a very annoying problem while using Zend Framework(ZF). We use ZF in our web application, and it works fine at the beginning, but later when concurrent...
0
by: Sean Quinn | last post by:
Hi All, First off let me say that from what I've seen of the XDebug debugger, I'm pretty impressed--it would just be nice if I could actually use it to its full potential in Eclipse. My...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.