OPNsense Forum

English Forums => Development and Code Review => Topic started by: Mad-Onion on January 22, 2016, 08:27:22 am

Title: Extending the captive portal
Post by: Mad-Onion on January 22, 2016, 08:27:22 am
Hey everyone,

first of all thanks for this great project!

We are planning to use the OPNsense captive-portal in our guest-wlan, but have some special requirements.
When people want to go online, they have to provide their first name, surname and email-address and also accept our terms and conditions. There is no need to validate these information, just enter, accept, click OK and they should be online.
At the same time, these information and the corresponding mac-address has to be logged.

Is there a possibility to extend the existing captive portal this way?


Best regards
Tobias
Title: Re: Extending the captive portal
Post by: AdSchellevis on January 22, 2016, 10:25:16 am
Hi Tobias,

The new captive portal supports template packages (current dev, will be in 16.1 next week), which should be rather easy to use with some javascript code to show/hide the terms.

You could create a custom plugin to handle the registration process and call it from the template, more information on how to build new functionality can be found in the hello-world sample.

Regards,

Ad