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 8018915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:14:27+00:00 2026-06-04T21:14:27+00:00

This must be a common scenario somehow: On a form called Subscription we have,

  • 0

This must be a common scenario somehow:

On a form called Subscription we have, among other subscription related fields, this:

Select How many foo you need:
Select box with 5 options from [1] to [5]

If the user selects 2 then, via Ajax the following should appear:

<!-- for 1 -->
 <input type="text" id="name1">Name of thing</input>  
 <input type="text" id="age1">Age of thing</input>  

<!-- for 2 -->
 <input type="text" id="name2">Name of thing</input>  
 <input type="text" id="age2">Age of thing</input> 

So, we have two tables (Subscription, foo), several records to be inserted on one of those tables (foo), all this on a single form.

Does anyone is kind enough to sketch a quick example on how should we properly deal with scenarios like the described above?

The closer that I found was this, but, doesn’t cover multiple models nor ajax. :/
http://www.yiiframework.com/doc/guide/1.1/en/form.table

Really hope someone could give me a push here.

  • 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-06-04T21:14:29+00:00Added an answer on June 4, 2026 at 9:14 pm

    Have look at the chapter Handling variable number of inputs in the book Yii 1.1 Application Development Cookbook

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this scenario, which I think must be pretty common: class Parameter {
This must be a common problem with a common solution. I have a lot
this must be such a common scenario that there's been a lot written about
This must be a common problem because I see it in many published papers
I'm sure this must be a common pattern in iOS apps. I have a
I think this must be a common scenario-- but I can't seem to find
I'm convinced this must be a common problem, but I can't seem to find
I know this must be a common question, but take a look: Here i
7 tables. In each table there is a common entity called fisherid. I have
I feel like this must be a common issue that I'm just struggling to

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.