Need a bit of help with my captive portal page
-
Hey folks, got a question about a captive portal page. The parent company of the place that I have the pfsense box at requires a specific page to be displayed before access to the internet is granted. The only problem i'm having is that I don't know how to make it mesh well with pfsense's captive portal requirements. The deal is that there has to be a check box that the user checks and then the click on a gif image, not a button, to submit the request. If the checkbox isn't checked then an error displays reminding the user to check the box. Here's the required code that is giving me problems:
<form name="terms" id="terms"> | | I accept the Terms & Conditions. | </form> | <a onclick="showerror()" style="cursor:pointer;">![Access the Web](captiveportal-new_access_btn.gif)</a> | Please accept the Terms & Conditions. |
So any help on making it work with the pfsense captive portal code requirements would be very much appreciated!
-
That's not a complete page. You either need a complete html-page or a php-page. You could do the checkbox check using javascript and an ordinary html or use php for this. html with javascript is probably easier.
-
Yea, that's not the whole page, just the part i'm having problems with. The rest is just the huge list of terms and conditions from the parent company. Here's the complete page (minus the terms and conditions for brevity)
<title>Holiday Inn® eHost™ | Terms & Conditions</title> ![Holiday Inn Express®](captiveportal-new_hi_express_logo.gif) Please read the Terms & Conditions. If you accept the Terms, simply click below to connect. ### **Six Continents Hotels, Inc. Terms of Use of Internet** TERMS, CONDITIONS AND NOTICES #### AGREEMENT BETWEEN CUSTOMER AND SIX CONTINENTS HOTELS, INC The Service (“Service”) consists of providing a wireless or high speed internet connection to authorized users. Terms and condtions blah blah blah <form name="terms" id="terms"> | | I accept the Terms & Conditions. | </form> | <a onclick="showerror()" style="cursor:pointer;">![Access the Web](captiveportal-new_access_btn.gif)</a> | Please accept the Terms & Conditions. | ![Stay Smart®](captiveportal-new_stay_smart_img.gif)
-
You don't send the required form back to the cp for authentification.
From the cp-webguipage:
Upload an HTML file for the portal page here (leave blank to keep the current one). Make sure to include a form (POST to "$PORTAL_ACTION$") with a submit button (name="accept") and a hidden field with name="redirurl" and value="$PORTAL_REDIRURL$". Include the "auth_user" and "auth_pass" input fields if authentication is enabled, otherwise it will always fail. Example code for the form: