form embed on email (with default values) - html

I am trying to embed a form on a email with all the fields (inputs and textarea) filled. The mail seems good, but I find two problems:
1) The form submits clicking every input... Is it be embedded?
2) The main problem is that when I send the email the form tag (on hotmail) and the attribute "name" of the inputs and textarea, disappear (hotmail and ¿thunderbird?).
I am using Contact Form-7 (the wordpress plugin), and I configure it like this:
<form action="http://panel.1clicklawyers.net/userQuestions" method="POST">
De: <input value="[your-name]" name="user_name" style="border:0px; width:auto;"><input value="[your-email]" name="user_mail" style="border:0px; width:auto;">
Asunto: <input value="[your-subject]" name="subject" style="border:0px; width:auto;">
<h2>Cuerpo del mensaje:</h2>
<textarea value="[your-message]" name="question" style="border:0px">[your-message]</textarea>
<input type="submit" value="Enviar" style="background:#D8531D; color:#333; pading:15px;">
</form>
--
Este e-mail se ha enviado vía formulario de contacto desde 1clicklawyers http://www.1clicklawyers.net
On the side of the receiver everything seems good, but the names of the inputs and textarea disappear, and on the server side if I make:
var_dump($this->input->post()); //Using codeigniter.
var_dump($_POST); //I am not sure if this could work.
The result is bool(false).
MORE TESTINGS
I was making more tests, using different accounts and clients. The result is the next:
Hotmail: The form tag disappear (and too the attribute name of inputs and text area).
Hotmail on the android outlook client: When I click on the submit input, it opens a tab of the browser, but it sends me to the url base (panel.1clicklawyers.net) without the last segment (userQuestions).
ThunderBird: Using a 1clicklawyers.net account. Clicking on the submit it opens a new tab on the browser, but the var_dump shows "bool(false)". Could it be because thunderbird removes the attribute name??
Web Mailer: Using the same account of 1clicklawyers.net, but on the web (using the 1&1 webmailer). I have no problem... I click on the submit and everything works fine.
Gmail:No problem. A confirm window ask you for permissions to send info, accepting I can see how the var_dump is working fine. OK.
Is there any way to make it works on all clients??
Possible solution
One thing that maybe can solve this is use a link with the parameters, something like:
Send
But the get method has a limit of chars, and the message could be too much long for it.
Any other solution??
Thanks!!

Its not possible to make a form within an email. Email clients dont support this feature.
Most email clients takes it as phishing so they dont support it.
You can see a list here of who support it. link

Related

How to access required element of HTML in shiny

I am working on form where i am taking inputs from users and all fields are mandatory and have validations like valid emailid, only 6 digit pincode.I have created a form on HTML and all validations are working fine on HTML by using "required" element of HTML which makes input type mandatory also input type email of HTML put all the validations required for an emailid.
But i want to achieve same thing in shiny internal UI form i tried a lot by accessing html tags inside shiny but everytime i am getting error for required element that i placed inside input tag of shiny.
Below attached image is from HTML form that i created using raw HTML but i want to achieve same thing in my shiny internal form.
Code for the above image:
<input type="email" name="emailid" value="" placeholder="Enter valid email id" required>
Can anyone help me how to achieve the same.Any help would be appreciated!
My solution to this would be in two parts. First, I'd put an observer on input$emailid to check that the user has entered a valid email address. If they haven't I'd then use the shinyFeedback package to display a pop-up prompting the user to put things right. You could also use shinyFeedback to display the prompt you show in your screen grab when the input is empty, but my own personal opinion is that that would be overkill.
Something like:
library(shinyFeedback)
observeEvent(input$emailid, {
feedbackDanger(
"emailid",
!isValidEmailAddress(input$emailid),
"Please enter a valid email address"
)
})
To get shinyFeedback to work you need to add useShinyFeedback() at the start of your ui page. Furter details here. Note that isValidEmailAddress() is a function you'll need to write yourself.

form - enable middle click on submit button (using pure html only!)

I have 4 links. Previously implemented as A tags.
My goal is to switch the request method (GET) with POST. Everything else have to remain the same!
The problem - it must be implemented using pure HTML - to be exact - no ajax and no window.open().
My solution is half way there. Hopefully to get a creative second half from you (impossible is also an answer)
Here is the (simplified) HTML:
<form
id = "resultsForm"
target="_blank"
action="http://example.com"
method="post"
>
<input type="hidden" name="data" value="someData">
<button type="submit" value="submit">
<p class="contextual"> title </p>
<span></span>
</button>
</form>
Now, it looks and feels like the old implementation and also sends POST requests
But - contrary to a link - a button can't be middle clicked or opened in new window when right clicking on it (by default...)
Can I somehow wrap it in an A tag to achieve the explained behavior without using js events or be conflicted with form subbmission?
Your help is really appreciated
No, this is impossible.
Anchor elements cannot contain interactive elements such as button elements.
Forms should be posted to the target window, so a normal click on the submit button, by virtue of the _blank value, should open an unnamed browsing context (a new window or tab).
Users should be accustomed to not middle-clicking on buttons, although there is a habit of developers to style links to look like buttons, throwing off users' expectations (end rant:)).

Simple cross domain form posting not working (whmcs)

I am trying to get a search box to post its content into a searchbox on another domain, using the html post method, however its not working after being redirected to the second site the search box remains empty on site 2.
Both servers belong to the same business and I have access to both, can someone tell me what I could do without using java to get the contents from the input box 1 on site 1 posted to the input box 2 on site 2
here is the line of code I am using on the first site.
form action="https://site2.com/cart.php?a=add&domain" method="post"
Thanks
You''ll need to catch and process both the GET arguments (in your action URL) and the POST stream (from the form elements) in the site2.com/cart.php file that you are using as the action.
Assuming the input box on site1 is named inputBox and is contained in the form with that action, when the form is submitted the site2.com/cart.php script can access the value at $_POST['inputBox'] - ie, wherever that goes on site2, you could do
<form name="someformonsite2" action="....">
<input type=text
<?php
if((!empty($_POST['inputBox'])&&(passes_your_validation($_POST['inputBox']))){
print("value=\"".$_POST['inputBox']."" );
}
?>
size=12 maxlength=11>
<!-- rest of form follows -->
Which would effectively send to the browser:
<input type=text value="SomeVal" size=12 maxlength=11>

Autofill, Autocomplete in all browsers in form in fancybox

Hi I have the following problem. I am building a form inside a div which initially is with display:none; inside that form I have two fields - e-mail and password like this:
<form id="formino" name="blah" action="" autocomplete="on"><input type="text" name="emal" id="maila" autocomplete="on"> .................. </form> ....
So in that way the integrated in the browser autocomplete(autofill) doesn't work no matter what I do.
The doctype is html5. The html is perfectly constructed. It never worked before . The browser is thousand times checked and is with the best settings for that with all the privacy stuff done right (IE,FF,Chrome).
Please don't suggest "we need more info, etc , etc". Assume that everything is ok with the code.
Again:
Fancybox, div - display:none; form , inputs, AJAX after button click, bind on the submit() with return false;
Thanks

Input Type URL - Says "Please enter a URL" if HTTP is not included

I've been working on a form and run into a snag. I've been using input type="url" so that iPad and iPhones etc all pull up the correct keyboard - and to try and follow the new standards.
I've run into an issue though. On a form where the web address is not required - if a user types in www.theiraddress.com most browsers outline it in red/yellow to notify the user they need to enter "http://" before it.
I've used input:invalid css to remove that outline.
However now when the user submits the form, the browser throws an error saying "Please enter a URL".
The field isn't required - I just wanted to make it easier for folks to enter their addresses - but still display the right keyboards on mobile devices etc.
Is there a way to remove this annoying tooltip that prevents users from submitting the form?
You can add a novalidate attribute to the form element. Fx:
<form method="post" action="/foo" novalidate>...</form>
See https://www.w3.org/TR/html5/sec-forms.html#element-attrdef-form-novalidate
Taken from this answer:
https://stackoverflow.com/a/3094185/1497627
As far as I know, according to the standard, the protocol is required (Url input field implementation state). You could alternatively use a regexp to validate that field such as /^(?:(http|https|ftp):\/\/)?(?:[\w-]+\.)+[a-z]{2,6}(\/)?/i
According to the bottom of the referenced page (http://www.wufoo.com/html5/types/3-url.html) you can use the text input type and the inputmode attribute (http://www.wufoo.com/html5/attributes/23-inputmode.html) to get to the keyboard on mobile devices without being fussy about the text field.
If I understand correctly, you want that when a user enters the url without http://, automatically adds http:// front of the url so as not to report error
Try this:
//PUT THIS IN HEAD
function check_url(){
//Get input value
var elem = document.getElementById("url_input");
var input_value = elem.value;
//Set input value to lower case so HTTP or HtTp become http
input_value = input_value.toLowerCase();
//Check if string starts with http:// or https://
var regExr = /^(http:|https:)\/\/.*$/m;
//Test expression
var result = regExr.test(input_value);
//If http:// or https:// is not present add http:// before user input
if (!result){
var new_value = "http://"+input_value;
elem.value=new_value;
}
}
Try to input www.myurl.com<br />
Try to input http://www.myurl.com<br />
Try to input https://www.myurl.com<br /><br />
URL INPUT:<br />
<input type="url" id="url_input" name="url_input" /><br /><br />
<input type="button" value="Submit!!" onclick="check_url()" />
Replace www.myurl.com with http://www.myurl.com
Nothing happens if http://www.myurl.com or https://www.myurl.com
Note: http://www.myurl.com automatically will be converted in https://www.myurl.com by browser if myurl.com domain support SSL(https:)
Working demo: http://jsfiddle.net/Yeti82/281a4hs8/