Getting Started

5 Dec 2016 / 1 minute to read

This section explains briefly about the necessary steps required to render and configure EJ GroupButton control using PHP wrapper classes.

Create a PHP Project and add necessary scripts and styles with the help of the given PHP Getting Started Documentation.

Create a GroupButton

Create a GroupButton control by instantiating the PHP wrapper class available in EJ namespace as shown below.

  • html
  • <label class="btn_label">Appointment View</label>
            $data='[{ "text": "Day", "contentType": "textonly" },           
                { "text": "Week","contentType": "textonly" },
                { "text": "Month", "contentType": "textonly", "selected": "selected" },
                { "text": "Year", "contentType": "textonly" }]';
            $groupBtn=new EJ\GroupButton("groupBtn");
            echo $groupBtn->groupButtonMode("radiobutton")->dataSource($data)->showRoundedCorner(true)->width("100%")->render();

    Add the following styles to show the CheckBox control in an order.

  • css
  •  <style>
            .btn_label {
                display: inline-block;
                margin-bottom: 20px;
                font-weight: 500;

    The following screenshot illustrates the output of above code.