Hi Andrew, Did you ever gett his resolved? I'm facing the same issue as you and haven't been able to find a way to set a fixed mobile provider and hide the field so as to not confuse our users.
(I have the same issue with a "password of the day authentication" which requires a username which I don't want the users to type or see..) Best regards Michel Pedersen Norwegian Public Roads Administration Postal address: Statens vegvesen Vegdirektoratet, Postboks 8142 Dep, 0033 OSLO Office address: Brynsengfaret 6A, OSLO Mobile: +47 99117502 e-mail/Lync: [email protected]<mailto:[email protected]> www.vegvesen.no<http://www.vegvesen.no> e-mail: [email protected]<mailto:[email protected]> Please consider the environment before printing this e-mail Fra: Torry, Andrew [mailto:[email protected]] Sendt: 7. juni 2016 17:17 Til: [email protected] Emne: Re: [PacketFence-users] Hiding 'Mobile Provider' field in SMS registration form Hi James, Is this the only line I need to add to the 'signup.html' file? I have added this to my template file (For the SMS registration form) but the field is still there. I am no HTML expert I'm afraid. I have:- <!-- START signup.html --> <form action="/signup" method="post"> [% IF sms_carriers %] [% out = form.get_field("mobileprovider").options(sms_carriers) %] [% END %] <input type="hidden" name="mobileprovider" value="100122"/> [% IF fields.exists('aup') %] <div class="card"> [% form.get_field('aup').render | none %] </div> [% END %] <div class="card[% IF fields.exists('aup') %] card--hidden card--disabled[% END %] layout layout--center"> <div class="layout__item u-2/3 u-1/1-palm"> [% FOREACH field IN fields.keys %] [% NEXT IF field == 'aup' %] <div class="input-container"> [% form.get_field(field).render | none %] </div> [% END %] <button type="submit" name="submit" class="btn btn--full u-mt"> <div class="flag"> <div class="flag__img">[% svgIcon(id='ic_done_black_24px',size='small') %]</div> <p class="flag__body">[% i18n("Register Now") %]</p> </div> </button> </div> </div> </form> <!-- END signup.html --> From: James Rouzier [mailto:[email protected]] Sent: 07 June 2016 14:37 To: [email protected]<mailto:[email protected]> Subject: Re: [PacketFence-users] Hiding 'Mobile Provider' field in SMS registration form You can create a hidden input field in the form <input type="hidden" name="mobileprovider" value="<The Id of the mobile provider>"/> James Rouzier [email protected]<mailto:[email protected]> :: +1.514.447.4918 (x115) :: http://www.inverse.ca Inverse inc. :: Leaders behind SOGo (http://www.sogo.nu) and PacketFence (http://www.packetfence.org) On 2016-06-07 5:39 AM, Torry, Andrew wrote: We are running PF 6.0.3 (with mods) and have E-Mail based Registration working the way we. We have now moved on to enabling an SMS text based registration page. As a JANET organisation we subscribe to the JISC Text service which enables us to send an SMS text to ANY mobile phone regardless of its provider. Since this is the only SMS mobile provider we need we want to avoid confusing the 'Guest' with an unnecessary input field for 'Mobile Provider' in the registration page. I have tried 'modding' the HTML code in the 'signup.html' template file thus:- +<!-- [% IF sms_carriers %] [% out = form.get_field("mobileprovider").options(sms_carriers) %] [% END %] +--> Which does not seem to achieve anything. I have also tried:- [% FOREACH field IN fields.keys %] [% NEXT IF field == 'aup' %] + [% NEXT IF field == 'mobileprovider' %] <div class="input-container"> [% form.get_field(field).render | none %] </div> [% END %] Which works in hiding the field but yields a 'Field missing error message' which is not surprising. How can we 'hide' the field in the form? Short of a software hack. Andrew ------------------------------------------------------------------------------ What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic patterns at an interface-level. Reveals which users, apps, and protocols are consuming the most bandwidth. Provides multi-vendor support for NetFlow, J-Flow, sFlow and other flows. Make informed decisions using capacity planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e _______________________________________________ PacketFence-users mailing list [email protected]<mailto:[email protected]> https://lists.sourceforge.net/lists/listinfo/packetfence-users
------------------------------------------------------------------------------
_______________________________________________ PacketFence-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/packetfence-users
