473,410 Members | 1,873 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,410 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 1090

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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.