Announcement

Collapse
No announcement yet.

The "create" view JS?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • The "create" view JS?

    This may be completely obvious... I've been working on /record/detail.js in my module, but I can't seem to figure out what makes /#<entity>/create work. I want to apply the same things I'm doing in edit details to when a new item is created. Thanks.

  • #2
    Inovke view in edit mode

    PHP Code:
    this.createView('DesiredEntity''views/record/edit', {
    mode'edit',
    modelmodel,
    elthis.getView('YourViewWhereYouWantCreateView'),
    buttonList: [{
    name'save',
    label'Save'
    }, {
    name'close',
    label'Close'
    }]
    }, function (
    view) {
    view.render();
    }.
    bind(this)) 

    Comment


    • #3
      Thank you, I was asking more for the JS side... this helped jog my memory that /views/record/edit does look to be what "create" uses.

      Comment


      • #4
        I write code in js, this is how I create view ( for new record creation ) on frontend

        Comment


        • #5
          I'm sorry I realize that now... I'm not sure why it said PHP Code, as that does look like JS.

          Comment

          Working...
          X