In the signup.html (or signin.html) file in the profile folder (or via the 
GUI):-
replace:-

  [% IF sms_carriers %]
  [% out = form.get_field("mobileprovider").options(sms_carriers) %]
  [% END %]

With:-

    <div hidden class="input-container">
        <div>
            <label for="fields[mobileprovider]">Mobile provider</label>
            <select name="fields[mobileprovider]" id="fields[mobileprovider]">
            <option selected value="ID CODE OF PROVIDER" 
id="fields[mobileprovider].1">NAME OF SMS PROVIDER TO DISPLAY</option></select>
        </div>
    </div>

And also you need to suppress the display with:-

After:-

      [% FOREACH field IN fields.keys %]
      [% NEXT IF field == 'aup' %]

Add:-
      [% NEXT IF field == 'mobileprovider' %]

This will give you the default and hidden that you need-

Regards

Andrew


From: Brian Beckwith [mailto:[email protected]]
Sent: 28 April 2017 21:15
To: [email protected]
Subject: [PacketFence-users] Hard code SMS Provider and hide Field

Hi i have got a working PF ZEN version 7 server going and its working great. I 
would like to Hardcode the SMS provider and hiide the field on the HTML form. I 
searched this group and fond soulution but they seem to be for earlier versions 
of Packetfence and dint seem to apply to version 7. I do not have a signup.html 
or a guest.html my guess is there are being generated by the template toolkit 
but i cant find out how its generating the HTML code for the page.

If anybody could point me in the right direction that would be great.





Andrew Torry

Senior Infrastructure Engineer



Tel: 01326 370760

Email: [email protected]




[cid:[email protected]]
        [Falmouth Exeter Plus]                  
[cid:[email protected]]


        [Twitter] <https://twitter.com/falmouthexeter>          [Facebook] 
<https://www.facebook.com/falmouthexeter>            [Instagram] 
<https://www.instagram.com/falmouthexeterplus/>             [YouTube] 
<https://www.youtube.com/channel/UC5-Jq4vTOhWgYoJJDYrZHWw>

[cid:[email protected]]


[Falmouth University]

Falmouth Exeter Plus is an exempt charity established by Falmouth University 
and the University of Exeter to deliver their shared Higher Education services 
in Cornwall.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
PacketFence-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/packetfence-users

Reply via email to