Custom Captive Portal Page

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom Captive Portal Page

Not applicable


I am creating a custom captive portal page.  As part of my page, I would like to pass the username and password as hidden values so that all a guest user would need to do is to click on the button to accept the terms and authentication to occur with the variables that will be passed along. Is something like this possible?  If it is, are there any examples

2 REPLIES 2

L1 Bithead

If you are using 6.1.X (and probably some older versions), there is a way.  This doesn't work under 7 at this time, though.  (I was here looking for help with 7)

If you export the captive portal comfort page, then edit it, you'll find a tag called <pan_form/>.

Replace that tag with this:

<form name="login2" id="login_form2" method="post">

  <input type='hidden' name="inputStr" value="foo">

  <input type='hidden' name="escapeUser" value="bar">

  <input type='hidden' name='user' value='portaluser'>

  <input type='hidden' name='passwd' value='password'>

  <div class="buttonWrapper">

  <input class="buttonFixed" type="submit" id="submit" name="ok" value="Login" onClick="document.getElementById('taLogin').innerHTML = '';">

  </div>

</form>

Import the resulting form, and you should be good to go, aside from customizing the page to look the way you want, and (of course) you will need a local user named "portaluser" with the password "password".


I'm not certain if all the inputs need to be used, but do know that it works like this.

Support got back with me.  One line from the above that worked with 6.1.4 seems to break 7.  The following form code works in v 7.0.0:

<form name="login2" id="login_form2" method="post">

  <input type='hidden' name="escapeUser" value="bar">

  <input type='hidden' name='user' value='portaluser'>

  <input type='hidden' name='passwd' value='password'>

  <div class="buttonWrapper">

  <input class="buttonFixed" type="submit" id="submit" name="ok" value="Login" onClick="document.getElementById('taLogin').innerHTML = '';">

  </div>

</form>

We found that this works as well with 6.1.4, so we're moving to this as our standard captive portal config.

  • 5036 Views
  • 2 replies
  • 1 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!