zend-framework

How to filter and validate user input in Zend Framework

Hi, on my website I have a comment section. I want to filter and validate the input before I store it in my database. If there are any invalid chars in the input the user gets the notice that his input is invalid. My question, which chars are not allowed? e.g. I want to avoid sql injections Tags are not allowed. How do I check that? ...

In Zend Framework applications, what purpose does the /views/filters serve ?

I have an idea of what view helpers do (/view/helpers), but I have no idea what a view filter (/view/filters) is, or what its used for, can some one please shed some light on the matter? Thank You =) ...

Form generation on the fly / Dynamic forms / forms generated from models

Has anyone tips with building applications similar too wufoo.com? I am building an app where the logged in user creates forms in a similar manner...what i am wondering is if zend, symfony or yii is best suited for this? I will be collecting tips here for other to see easier. advantages of the frameworks that could help with this: Sym...

How to retrieve Profile data usign OpenID authentication? ( Zend Framework )

I read some tutorials and came up with the following script to authenticate with OpenID. But I don't know how to retrieve profile data of the user logged in, like fullname, or email. can anyone help me with that? $status=''; $auth=Zend_Auth::getInstance(); $post=array(); $get=$this->getRequest()->getParams(); if($this->getRequest()->is...

Run an unprepared statement with Zend Db

Hi, I am trying to use a LOAD DATA INFILE statement with a ZF 1.10.6 application. However, the Mysqli adapter reports that Zend_Db_Statement_Mysqli_Exception: Mysqli prepare error: This command is not supported in the prepared statement protocol yet in /xxx/library/Zend/Db/Statement/Mysqli.php on line 77 So I can't use ...

Zend Form. Adding a href and placing some elements in div.

Hello. I have some zend form. It is my code: private function _createForm($action) { $form = new Zend_Form(); $form->setName($action . '_form'); $form->setMethod('post'); // Main tab $title = $form->createElement('text', 'title'); $title->setLabel('Title') ->setAttrib('maxlength',50)->setAttrib('id',...

Trying to get property of non-object Zend Bootstrap

I'm moving a site from development to production and suddenly this error keeps popping up: Notice: Trying to get property of non-object in /var/www/vhosts/xxxx/httpdocs/application/Bootstrap.php on line 16 Notice: Trying to get property of non-object in /var/www/vhosts/xxxx/httpdocs/application/Bootstrap.php on line 17 Notice: Trying to...

Zend Form from simple html

My task is to create a Zend Form from the next Html: <form method="post"> <h3><a href="">link1</a></h3> <div> <input type="text" name="name1"> </div> <h3><a href="">link2</a></h3> <div> <input type="text" name="name2"> </div> </form> ...

Zend frame work Custom view helper error

Hi am trying to add custom helper throughout my application Have done following steps index.php $view = new Zend_View(); $view->addHelperPath('My/View/Helper', 'My_View_Helper'); Zend_Controller_Action_HelperBroker::addHelper($viewRenderer); Helper class in My/View/Helper class My_View_Helper_Common extends Zend_View_Helper...

ZF AJAX drop down

How can i code for country state dropdowns in zend framework using ajax I am not using zend_form class using zend_helpers for building form . any example code please. Thanks ...

How to change currency format in zend framework's locale settings (skipping decimal places)?

In it's default setup, the currency format for German Euro is "#,##0.00 ¤" which displays something like "750,00 €". I want to skip the decimal places to have the display "750€". When I change the currency format to "0 ¤" the €-symbol is not being displayed. Is this a bug oder what am I doing wrong? ...

Is there any Datagrid library for Zend And Jquery combination

Is there any Datagrid library for Zend And Jquery combination. ...

zend framework select join error getTable()

I am trying to implement this method in my model: class Application_Model_MenuProfilesProducts extends Zend_Db_Table_Abstract { protected $_name = 'menu_profiles_products'; public function fetchProducts($profileID) { $select = Zend_Db_Table::getDefaultAdapter()->select() ->from(array('mpp' => 'men...

Zend_Dojo_Form in tabs creates ID conflicts

I have a dojo layout that creates a sidebar on the left with a list of pages and a center area which is a tab container. When a user double clicks a page in the sidebar, it creates a new closable tab in the center with a form to edit that page (the form is loaded via the href attribute on the ContentPanes, it's a standard Zend Framework...

Does Zend_DB / Doctrine protect me from SQL injection?

Does using prepared statements in Zend_DB or Doctrine protect me from sql injection? example: $stmt = $db->prepare('SELECT * FROM users WHERE name = ? AND password = ?'); $rs = $stmt->execute('peter', 'secret'); Or do I have to check strings and types types myself? Another quickie: Which of the two is best? I only need the DB abstra...

Zend Framework Architecture

Hi Need to confirm Zend Framework Hierarchy of Objects , Zend_Application has a Property Object Bootstrap Bootstrap has a Property Object Zend_Controller_Front inside Zend_Controller_Front has nested Objects like Request , Response , Plugins and also a dispatcher() method through dispatcher Interface When Zend_Front_Controller's...

Zend_Mail and Google Apps strange behavior

Seems that you can't modify the "From" header...always map to [email protected] or [email protected]. Also, keeps adding a CC header to the sender. Is this normal? ...

How to set any attribute of Select lke disabled='disabled' by using ViewHelper in Zend Framework

Hi, i am using Zend Frameworks ViewHelpers. I am trying to pass something to set disabled attribute in SELECT. for example if $countries = array(1=>'Select Option', 2=>'us', 3=>'uk') and formSelect('country','us',null,$this->countries) I need to diable first option i.e. 'Select Option' Do you have any idea ? Thanks in addvance ...

Zend framework on subdomain

Hi, How do I setup Zend framework on sub domain manually? What setting do I have to change in the bootstrap file? ...

Zend Framework: Chaining forms: how can I "unset $this->getRequest->isPost()"?

This is a pretty basic thing but I can't figure out how to solve this "properly" with Zend Framework: Scenario: Page displays form 1, Page display form 2 This is a pretty basic thing but I can't figure out how to solve this "properly" with Zend Framework: Scenario: Page displays form 1, Page displays form 2 class FooContro...