Body: <p>I am a Craft newbie, and I'm currently making a few custom templates, learning Twig, etc.<br>
  My question is: in including a form in my template code, how would the form be coded (Twig or HTML)?  Is there a good tutorial/reference on forms used in this way?  Also, how would I reference my php code (which is within my plugin)?  </p>
  
  <p>The form will be an log-in authentication, and the plugin contains the code to verify that the user exists in Active Directory (LDAP).  </p>
  
  <p>I'll sketch out the way my website is laid out.  There are only a handful of users who actually log in to CraftCMS in order to make changes to content on the website.<br>
  However, the login form I'm making here is not to log in to Craft, but to gain access to one page of the website.  I will need to create a form page template and have it submit to my php code (plugin) somehow.   </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-14T21:30:07.693Z
Comments.Text: I highly recommend taking a look to the contact form plugin from Pixel and Tonic -> https://github.com/craftcms/contact-form/tree/v1 for Craft2 (Craft3 is in the V2 branch)
  
  Check how they add hidden values in the `Usage` section of the readme file. You can follow the code in the controller folder. Best!
Comments.UserDisplayName: Andre L.
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-18T21:45:30.800Z
Comments.Text: Thanks - I've checked it out.  Just out of curiosity, where in the controller do 'action' and 'redirect' values appear?  I saw them (hidden) in the form code, but cannot in the processor.  Thanks
Comments.UserDisplayName: buck1112
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-19T16:49:04.450Z
Comments.Text: I've added some clarification in my question (above) in the last paragraph, re: purpose of login form and website structure.
Comments.UserDisplayName: buck1112
Tags: <plugin-development><templating><form>
Title: Form in Front End Template Reference Plugin for LDAP
ThreadText: # Form in Front End Template Reference Plugin for LDAP
  
  (Asked by: username_0 on 2018-06-14)
  
  I am a Craft newbie, and I'm currently making a few custom templates, learning Twig, etc.  
  My question is: in including a form in my template code, how would the form be coded (Twig or HTML)? Is there a good tutorial/reference on forms used in this way? Also, how would I reference my php code (which is within my plugin)?
  
  The form will be an log-in authentication, and the plugin contains the code to verify that the user exists in Active Directory (LDAP).
  
  I'll sketch out the way my website is laid out. There are only a handful of users who actually log in to CraftCMS in order to make changes to content on the website.  
  However, the login form I'm making here is not to log in to Craft, but to gain access to one page of the website. I will need to create a form page template and have it submit to my php code (plugin) somehow.
  
  **Tags:** plugin-development, templating, form
  
  > **Comments:**
  > **username_1**: I highly recommend taking a look to the contact form plugin from Pixel and Tonic -> https://github.com/craftcms/contact-form/tree/v1 for Craft2 (Craft3 is in the V2 branch)  Check how they add hidden values in the `Usage` section of the readme file. You can follow the code in the controller folder. Best!  
  > **username_0**: Thanks - I've checked it out.  Just out of curiosity, where in the controller do 'action' and 'redirect' values appear?  I saw them (hidden) in the form code, but cannot in the processor.  Thanks  
  > **username_0**: I've added some clarification in my question (above) in the last paragraph, re: purpose of login form and website structure.  
  
  ---
  
  ## 0 answers
  
  