Jump to content

Insert field at form for SSL connect


builders

Recommended Posts

Hi i have a form that logins at a mail. I have installed an SSL at this domain and i would like to add an option at the form for the user to login using https or not

 

the form is above. How can i add an option with check-box from user to login using https ???? IF this is checked when the user clicks "login" he will redirected to https and will login.

 

If i have not describe well please ask for details.

 

Thanks

 

<form class="login-form" action="<?php echo $this->moduleBaseUrl; ?>/XXX/XXXXXX" name="loginPage" id="loginPage" method="post">

<input type='hidden' name='emailName' value=''/>

<input type='hidden' name='emailDomain' value=''/>

<input type='hidden' name='cssStyle' value='<?php echo $this->cssStyle ?>'/>

 

<table class="login">

<tbody>

<tr>

<td>

<label class="user"><?php print $this->translate('Email') ?>:</label> <input id="email" class="input-email" type="text" name="email" tabindex="1" />

</td>

</tr>

<tr>

<td>

<label class="pass"><?php print $this->translate('Password') ?>:</label> <input id="password" class="input-pass" type="password" name="password" tabindex="2" />

</td>

</tr>

 

<tr id="LoginBtn" style="display: none;">

<td>

<input class="loginbtn <?php echo $this->cssStyle ?>" type="submit" value="<?php print $this->translate('Login') ?>" /> <span class="remember"><?php print $this->translate('Remember Me') ?></span> <input class="check" type="checkbox" value="1" name="RememberMe" />

</td>

</tr>

</tbody>

</table>

</form>

Link to comment
Share on other sites

You'll have to use javascript to change the form's action parameter to the new HTTPS url when they check the box (or revert it back if they uncheck it). 

 

Posting to a non-https page then redirecting to an https url based on the checkbox would defeat the purpose of using https at all because the initial post of the login details would not be encrypted.

 

 

Link to comment
Share on other sites

You'll have to use javascript to change the form's action parameter to the new HTTPS url when they check the box (or revert it back if they uncheck it). 

 

Posting to a non-https page then redirecting to an https url based on the checkbox would defeat the purpose of using https at all because the initial post of the login details would not be encrypted.

 

Is there a way when the client hit "submit" not to sent the data but to make the redirect to https and then submit the data ?? or this is not possible ??

 

Thanks

 

Link to comment
Share on other sites

Is there a way when the client hit "submit" not to sent the data but to make the redirect to https and then submit the data ?? or this is not possible ??

 

No.  The only non-JS solution would be to have a link such as 'Login via HTTPS' and when the click on that link you take them to a login form over https and they can enter their details there.

 

Or just force them to always login using https.  Why even have the option?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.