Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-23-2008, 07:43 PM
Junior Member
 
Join Date: May 2008
Posts: 2
Default Zend_Form_SubForm - How to add dynamic content

I've been googling for an answer but I don't know how to phrase the question to my problem so I'm hoping this is the right place to ask.

I want to create a Zend_Form_SubForm that can contain a variable number of records. When the user clicks the "Add" button, I want to add a record. When the user submits the data I want the Zend_Form_SubForm to validate the data.

Initially the form will contain no records but after adding records, a subsequent request for the page will return rows.

How do I add HTML content to a Zend_Form_SubForm? (I want to create a button using an "a" tag and CSS - I have it working on a "sidebar.phtml".)

I'll use Javascript to add/remove records, but how do I name the fields so that the data can be validated? When I add a select field it looks like this:

HTML Code:
<select name="form1[tslist][tscode]" id="form1-tslist-tscode">
How do turn this into an array? Is it simply a matter of adding [1] after [tscode]?

Thanks in advance,
Jamie
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 06-27-2008, 07:16 PM
Junior Member
 
Join Date: Jun 2008
Location: earth
Posts: 14
Default

Did you ever get an answer to this?
It sounds exactly like the same thing I am looking for.

Any info would be great.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 07:51 AM.