Ticket Form
Advanced
Implement a custom wrapper

Ticket Form - Implement a custom wrapper

How it works

The ticket elements come with a default wrapper.

The <ab-create-ticket> and <ab-ticket> elements come in modals which are closed by default, and the <ab-tickets-table> come in a container.

However, in some cases, you might want to implement your own wrappers.

Using the -body element

All 3 elements have corresponding elements with -body suffix.
I.e. <ab-create-ticket-body>, <ab-tickets-table-body>, and <ab-ticket-body>.

HTML
<div className='create-ticket-container'>
  <ab-create-ticket-body
    ticketFormID='YOUR-TICKET-FORM-ID'
    // ...additional attributes
  ></ab-create-ticket-body>
</div>
 
<div className='table-wrapper'>
  <ab-tickets-table-body
    ticketFormID='YOUR-TICKET-FORM-ID'
    // ...additional attributes
  ></ab-tickets-table-body>
</div>
 
<div className='ticket-container'>
  <ab-ticket-body
    ticketID='YOUR-TICKET-ID'
    // ...additional attributes
  ></ab-ticket-body>
</div>

The -body elements receive the same attributes as their corresponding main elements.
However, the <ab-create-ticket-body> and <ab-ticket-body> does not include the open() and close() methods.

See all the available attributes in the Ticket Form Reference.


Aidbase Docs © 2024