private static function create_index($set_size, $page_size, $name = 'null')
 {
     require_once __DIR__ . '/Helpers.php';
     // set get_name param if displaying by name
     if ($name !== 'null') {
         $get_name = 'true';
     } else {
         $get_name = 'false';
     }
     // set up div
     echo '<div class="zws-contacts-database-index">';
     // echo the page numbers with their links
     for ($i = 1; $i <= self::$number_of_pages; $i++) {
         $page_url_query_string = \ZwsContactsDatabase\Helpers::set_url_query_cleared(array('show_all' => 'true', 'contacts_page' => $i, 'postback' => 'false', 'getname' => $get_name, 'lastname' => $name));
         echo '&nbsp;<a class="zws-contacts-database-display-index" style="' . Zelp::getCss('page_index') . '" href="' . $page_url_query_string . '">' . $i . '</a>';
     }
     // end div
     echo '</div>';
     return true;
 }
 public static function display_form()
 {
     require_once __DIR__ . '/Helpers.php';
     $country_code = get_site_option(self::OPTIONS_LABEL)['zws_contacts_database_plugin_country_of_use'];
     // method to display the target postcode / address entry form.
     echo '<h3 style="' . Zelp::getCss('header_style_tag') . '">Search for nearest drivers</h3>';
     echo '<form action="' . Zelp::set_url_query_cleared(array('postback' => 'true', 'postcode_address_search' => 'true')) . '" method="post">';
     echo '<p style="' . Zelp::getCss('label_style_tag') . '">Target postcode (type address or postcode)</p>';
     echo "<p><input type=\"text\" id=\"target_postcode\" data-geo=\"postal_code\" data-country={$country_code} placeholder=\"Postcode / address\" name=\"target_postcode\" pattern=\"[a-zA-Z0-9|\\s]+\" maxlength=\"255\" value=\"\" style=\"width:85%\" /></p>";
     wp_nonce_field('submit_details_action', 'my_nonce_field');
     echo '<p><input type="submit" name="submitted" value="Submit"/></p>';
     echo '</form>';
     echo '<h3 style="' . Zelp::getCss('header_style_tag') . '">Get records for name</h3>';
     echo '<form action="' . Zelp::set_url_query_cleared(array('getname' => 'true')) . '" method="post">';
     echo '<p style="' . Zelp::getCss('label_style_tag') . '">Please enter the LAST NAME of the contact you require</p>';
     echo '<p><input type="text" placeholder="Last name" name="last_name" pattern="[a-zA-Z0-9]+" maxlength="21" value="" style="width:85%" /></p>';
     wp_nonce_field('submit_details_action', 'my_nonce_field');
     echo '<p><input type="submit" name="submitted" value="Submit"/></p>';
     echo '</form>';
     echo '<h3 style="' . Zelp::getCss('header_style_tag') . '">View entire database</h3>';
     $view_db_url = Zelp::set_url_query_cleared(array('show_all' => 'true', 'postback' => 'false'));
     echo '<div><button onclick="viewDatabase()">View the database</button><script>function viewDatabase() { window.location.href="' . html_entity_decode($view_db_url) . '";}</script></div>';
     return true;
 }