Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Need a bit of help with my captive portal page

    Scheduled Pinned Locked Moved Captive Portal
    4 Posts 2 Posters 3.9k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • L
      liontaur
      last edited by

      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!

      1 Reply Last reply Reply Quote 0
      • H
        hoba
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • L
          liontaur
          last edited by

          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) 
          
          
          1 Reply Last reply Reply Quote 0
          • H
            hoba
            last edited by

            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:

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.