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

  • Home
  • SEARCH
  • 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 8504365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:00:35+00:00 2026-06-11T02:00:35+00:00

I want to create a complex form with Backbone.Marionette. I think the form should

  • 0

I want to create a complex form with Backbone.Marionette. I think the form should be like this:

Form

Any change on products or payments should affect “sale” model. The model structure is:

sale   :   {
    date        :             '10/01/2010',
    customer    :             'Jaime Rivera'
    products    :             [{product_name:'ZZZZZZ', price: 100, quantity: 2},
                               {product_name:'yyyyyy', price: 33, quantity: 1}],
    payments    :             [{type:'check', other_data: '', amount: 160},
                               {type:'credit-card', other_data: '', amount: 73}] 
}

I would like to know the best way to structure the views to create the form. I’m not sure if i should use layout, compositeview or collectionview.

  • 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-11T02:00:37+00:00Added an answer on June 11, 2026 at 2:00 am

    There are multiple ways to make this work with Marionette’s views, and none of them are right or wrong necessarily. Some will work better for your other constraints, like what data needs to be used to render this, what events need to be handled, etc.

    Given the data that you’ve shown, though, this looks like a Layout with two CompositeViews.

    The Layout would render the the date picker, input box and two empty divs for products and payments. Each of these empty divs would have a region definition associated in the Layout, so you can show the products and payments.

    You could then have a CompositeView for products – a template that renders the list of products and the Add Product button. The CompositeView itself would handle the Add Product button click. An ItemView would be specified to render each Product in the list.

    Payments would be done the same way as Products.

    … again, this is only one option for making it work. You could do the entire thing with one Layout and 2 Collection views, or the entire thing as a single ItemView (which would be difficult to maintain, but still possible).

    Hope that helps.

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

Sidebar

Related Questions

Is there is any Jquery plugin for create complex DOM struture ? i want
My situation is a bit complex. I want to create $config rules for my
i want create Dynamic Slideshow in Jquery i'm Write this code var ctx =
I've got this complex filtering mechanism... d = copy(request.GET) d.setdefault('sort_by', 'created') d.setdefault('sort_dir', 'desc') form
I have a Create New Employee ASP.Net MVC form. My complex object is an
I'm trying to create a complex (from my opinion) form, but the process is
I would like to bind a complex object to a view. I create a
I'm attempting to create a complex div structure using CSS. I want it to
i want create multiple search where statement $where_search is a multiple condition from post
I want create wordpress website into which I want create user management... That means

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.