Jump to:

23367 Posts in 18143 Topics by 2863 members

General Questions

SilverStripe Forums » General Questions » Custom admin screens for car parking app

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Page: 1
Go to End
Author Topic: 381 Views
  • lozhowlett
    Avatar
    Community Member
    146 Posts

    Custom admin screens for car parking app Link to this post

    Not sure how to explain this, i want to create a custom form layout in the admin system, i.e. outside of the scaffolder. Its for a car parking system. The default scaffolder has given me the ability to add venues, and events, eg

    The Village Hall (Venue), 70s Disco (event)

    But now I need to be able to add multiple dates for the event and select the car parks available

    So I want a calendar (easy), then for each date selected on the calendar, you then select the car parks and tariffs available (which are pre loaded in reference tables in the admin system already) with the ability to overwrite the spaces, prices, etc from the reference table.

    - Car Park A
    ---- Tariff A | Spaces | Price | Active
    ---- Tariff B | Spaces | Price | Active
    ---- Tariff C | Spaces | Price | Active
    - Car Park B
    ---- Tariff A | Spaces | Price | Active
    ---- Tariff B | Spaces | Price | Active
    ---- Tariff C | Spaces | Price | Active

    Etc

    So the question is, how do I build forms/screens in the admin that do not use the scaffolder? Instead they use a completely custom layout and post data back at silverstripe to then populate the DB?

    Thanks for any help!

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Custom admin screens for car parking app Link to this post

    In your getCMSFields() you would need to create your new functionality with new form fields, i.e you could encapsulate your Carpark selector in a custom form field class 'CarkparkSelectFormField' . New FormField types can specify the custom javascript / html / css your form needs and be included inside the standard CMS.

    If you're looking at going completely custom and don't want to include any of the admin interface around the form, then your best bet is to create a new controller and build a front end version of the form which then you can use a custom form template without having the bulk of the CMS.

    381 Views
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.