0

We have to implement a ticket booking system in our capsule, where we need selectbox to select tickets. But I didn't get a selectbox in Bixby. so, I am using slider to select. On that I have to display event with input form element slider. But, unable to display js details and slider on one page.

Link: https://bixbydevelopers.com/dev/docs/reference/type/input-view.render.form.elements.slider

Action :

action (Book) {
 type(Search)
  collect { 
   input (rating) {
     type (Rating)
     min (Required) max (One)
  }
  input (event) {
     type (Event)
     min (Optional) max (One)
  }
}
 output (OrderBooking)
}

Structure :

structure (OrderBooking){
 property (event) {
 type (Event)
 min (Optional)
 max (One)
}

property (rating){
  type (Rating)
  min (Required)
  max (One)
 }
}

View:

input-view {
  match {
    OrderBooking (rating)
 } 

 render {
form {
  elements {
    slider {
      id (rating)
      min-value (0)
      max-value (10)
      min-label (0 - Lowest)
      max-label (10 - Highest)
      step (1)
      type (Rating)
    }
  }
  on-submit {
    goal: Rating
    value: viv.core.FormElement(rating)
  }
}
if (exists(rating.ticketName)){
  selection-of (rating) {
    navigation-mode {
      read-many {
        page-size (3)
        page-content{
          underflow-statement (This is the final set)
          item-selection-question {
            if(exists(rating.ticketName)){
              template ("Here are a few suggestions for the events.")
            }else{
              template (Which one would you like)
            }
          }
          overflow-statement (That's all I have)
        }
      }
    }
    has-details (false)
    where-each (item) {
      layout-macro (book-type-summary) {
        param (singlebook) {
          expression (item)
        }
      }
    }
  }
}
}
}

Layout:

layout-macro-def(book-type-summary) {
  params {
    param (singlebook) {
      type (OrderBooking)
      min (Required)
      max (One)
   }
 }

 content {
   compound-card {
     content {
      paragraph {
      value {
        if (exists(singlebook.event)){
          template ("#{value(singlebook.event)}")
        }
      }
      style (Detail_M)
      }
    }
  }
 }
}
Rahul Gupta
  • 972
  • 11
  • 29

1 Answers1

0

There are two points to this question:

  1. It looks like you would like to display additional information in the input-view. Currently this is not possible. You cannot add content that does not fit in the form you want to present to the user.
  2. Instead of a slider, perhaps it would be better for you to use selection-of (documentation)
Ameya
  • 880
  • 6
  • 13