Custom form with action as CurrentPageUrl()

Hi all,
I trying to add a small form in

 public function pageDataRendering(&$header)
    {
        // Example:
        $header = "<b>Enter dates in format :</b> <b style='color:#ff0000'> 00/00/0000 </b><b> to generate all invoices</b>";
        $header .= "<form class='ew-form ew-add-form' action='CurrentPageUrl(false)' method='post'>";
        $header .= "<span> START DATE  <input type='text' name='inv_datefrom' id='inv_datefrom' data-table='invoicebook' value='' size='20' maxlength='250' placeholder='Start Date of Month' class='form-control'>";
        $header .=  "  END DATE  <input type='text' name='inv_dateto' id='inv_dateto' data-table='invoicebook' value='' size='20' maxlength='250' placeholder='Last Day of Month' class='form-control'></span>";
        $header .= "<button class='btn btn-primary ew-btn' name='btn-action' id='btn-action' type='submit'>Generate Invoices</button>";
        $header .= "</form> ";
    }

and want to get dates $_POST[“”] entered by user to generate invoice from to date. But it generate error for action=‘CurrentPageUrl(false)’
Kindly help me, where I am making mistake?

Try to change this part:

$header .= "<form class='ew-form ew-add-form' action='" . CurrentPageUrl(false) . "' method='post'>";

Sir, Thank you for reply, I tried it. It show below error
"Bad Request
The server cannot or will not process the request due to an apparent client error."I also tried action=‘#’ It display above error.

https://discourse.hkvstore.com/t/invalid-post-request/4084/1