Title: Form action and https problem
Last modified: August 22, 2016

---

# Form action and https problem

 *  [fantoms](https://wordpress.org/support/users/fantoms/)
 * (@fantoms)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/form-action-and-https-problem/)
 * Hi,
 * we have WordPress site which uses PageLines DMS and just specific pages should
   be secured. That’s why we have enabled Force SSL Exclusively.
 * In every page we have search form generated with function `pagelines_search_form`
   offered from DMS. Now the problem is that WordPress HTTPS seems to change form’s
   action to http in secured pages and Chrome doesn’t like that at all.
 * So is there any setting to change form action to https in secured pages or what
   could be the solution?
 * [https://wordpress.org/plugins/wordpress-https/](https://wordpress.org/plugins/wordpress-https/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Simon Prosser](https://wordpress.org/support/users/pross/)
 * (@pross)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/form-action-and-https-problem/#post-5544133)
 * `pagelines_search_form` uses the filter `pagelines_search_form` before outputting
   the form.
 * [https://gist.github.com/Pross/bca1e55ddfa244e858bf](https://gist.github.com/Pross/bca1e55ddfa244e858bf)
 *  Thread Starter [fantoms](https://wordpress.org/support/users/fantoms/)
 * (@fantoms)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/form-action-and-https-problem/#post-5544201)
 * Thank you for your reply, but if we understand right there’s no filter `pagelines_search_form`.
   And we have tried even without `apply_filter` with no luck.
 * We have tried even like this:
 *     ```
       if ( $echo )
            echo str_replace("http","https",$searchform);
       ```
   
 *  Thread Starter [fantoms](https://wordpress.org/support/users/fantoms/)
 * (@fantoms)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/form-action-and-https-problem/#post-5544209)
 * A bit more info.
 * What we have figured out since now is that WordPress HTTPS is working right. 
   The search form’s action is `home_url()` and it’s not secured via HTTPS-plugin
   and we don’t even want it to be secured. But the action has to be HTTPS in those
   pages which are secured. That’s why we did now this:
 * `echo str_replace("https:","",pagelines_search_form( false, 'navi-searchform'));`
 * But would there be cleaner solution?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Form action and https problem’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-https_bec2c9.svg)
 * [WordPress HTTPS (SSL)](https://wordpress.org/plugins/wordpress-https/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-https/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-https/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-https/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-https/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-https/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [fantoms](https://wordpress.org/support/users/fantoms/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/form-action-and-https-problem/#post-5544209)
 * Status: not resolved