Jump to:

3448 Posts in 1062 Topics by 738 members

Data Model Questions

SilverStripe Forums » Data Model Questions » 2.4.5 - Forms assigned to DataObject?

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 328 Views
  • flipsidenz
    Community Member
    49 Posts

    2.4.5 - Forms assigned to DataObject? Link to this post

    Is it possible to have a Form attached to a DataObject?

    I have a ProductPage extending page, which loops through a DataObject called Product.

    Each product displayed has a simple form associated with it - kind of like "send me quote" form. I hide each form with CSS and when a product's button is clicked, the form displays and is filled out by the user.

    I want the form to be unique to the DataObject so that it can send a reference back in an email to the admin, telling them to provide a quote for that specific product.

    If I set up one generic form through ProductPage, how would I know which product the user has selected to be quoted on?

    There is no relationship between ProductPage and Product, other than within ProductPage a function is called which returns all Product objects.

    I'd be interested to know how others would tackle this issue?

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.