Contact Form not allow to enter data inside fields - javascript

Have one big problem that dont can resolve myself, because it seems more complex that i can handle myself. I have Contact Form created, and inserted CSS class that trigger popup window, with contact form. But when contact form is loaded, it dont allow me to enter any data inside fields, because looks like it is locked in some way. For example:
when press "Contacto" button (from right on image) is opening this popup window taht contain phone number about customer, and also another button called "Enviar email" that when is pressed trigger a new popup that contain contact form. This is code from that button:
<form>
<input class="spu-open-1734" type="button" value="Enviar email" />
</form>
class spu-open-1734 is CSS class generated by Popupups plugin.
When Contact Form is loaded into popup, it dont allow to enter any content into fields, like fields are blurred, and not allowing to enter nothing. Example here
Its really weird, because if upper code is inserted into Wordpress page for ex. its working fine, and allow to enter data. See here on this test page.

Related

Submit button with enter an url

I'm trying to create a bookmarklet, which captures the url of the current page, where the user is, puts this url into a text field of a form on a page and then submits the form by virtually pressing submit button.
With following code i get the url of the current page, go to the site with url http://example.com/?url=http://www.url-of-the-current-page, fill the url http://www.url-of-the-current-page into the form's text field, but the form itself remains unsubmitted:
javascript:(function(){ window.open('http://example.com/?url='+encodeURIComponent(location.href))})();
But how can i submit the form button? The whole form looks like:
<form ng-submit="launchTest()" class="ng-pristine ng-valid">
<input type="text" name="url" ng-model="url">
<input type="submit" value="Launch test" class="launchBtn" ng-class="{disabled: !url}">
</form>
I've tried two variants - and failed: in both variants i stay on http://example.com?url=http://www.url-of-the-current-page:
javascript:(function(){ window.open('http://example.com/?url='+encodeURIComponent(location.href));document.forms[0].submit()})();
javascript:(function(){ window.open('http://example.com/?url='+encodeURIComponent(location.href));document.forms[this.form.id].submit()})();
(Posted on behalf of the OP).
I've contacted the owner of the website, where I wanted to run my bookmarklet - he said, my bookmarklet is correct, but for submitting the form the url should contain a special parameter, like &run=1. With this parameter every bookmarklet mentioned in this thread works (works means not only opens new tab and inputs the url, but submits the form too). The working bookmarklet I'll use is:
javascript:(function(){var win=window.open('http://example.com?url='+encodeURIComponent(window.location.href )+'&run=1','_blank');win.focus();})()

Redirect the website URL Form to a particular Page

My Form Works Successfully But in website URL it only Shows the address to a Form.I have multiple Pages in which the Form button shown.All I want when a user click on The Form for Page A for that Particular page it should shown as
"www.form.com?test=page A" - this should displayed on website URL
or when the Form is submitted the receiver should view that this form coming from Page A..In the Form field I hidden this fields name 'Test' so the user cannot see it but only the receiver can view it that its coming from Page A
On my Html code I have redirected to the Build in Form.
Here is my java script code
<script type="text/javascript" src="http://test.com/form/y.php/test2"></script><no1script>Online Form - </no1script>
How to show it to my Website URL
I understand your question as "How can I redirect with a specific GET parameter?", correct me if I'm wrong.
The solution for that would be quite simple: Append the GET parameter to the forms action:
<form action="target.php">
gets
<form action="target.php?test=page_a">
so that on target.php if you evaluate the GET values, test has the value page_a.
If you're trying to hide the post data, you can try something like:
<form action="https://test.com/forms/discount" style="display:none">
<input type="text" name="couponCode" value="secret">
<input id="myform" type="submit">
</form>
<script>
document.querySelector("#myform").click();
</script>
Note: This won't stop any web ninjas, so you should think of something else, like web tokens that function sortta like private public keys.

Resubmitting the same form is not working

I am making an HTML page "Login Pro.html". I am making such a page where just clicking on a link I can login to an account (say Facebook).
HTML Code:
Login to my Account
The Form input fields for Username and Password (The value attribute will be set using JQuery):
<input type="text" id="username" value="" />
<input type="password" id="password" value="" />
<input type="submit" id="loginButton" />
In the JQuery code, I am setting the values and submitting the form like this:
$("#loginLink").click(function()//when the link is clicked this will be executed.
{
$("#username").attr("value","My Username");//Setting value for the username
$("#password").attr("value","My Password");//Setting value for the password
$("#loginButton").click();//Submitting the form by implicitly clicking the submit button
});
In this case I am able to login into my account successfully and the "Login Pro.html"(From the Page I am doing all these) is opening in a new page (because I have set target="_new" and the form is being submitted and taking me to the Home Page of the Account I am logging in into, is opening successfully in the first page (tab). But when I am trying to login again through the "Login Pro.html" page, opened in the new tab, I am being landed to the same page i.e. "Login Pro.html" page instead of getting logged in (In short in the second instance I can't login). After closing this page, when I am opening the page again, the same saga continues i.e. I am able to login in the first instance, but not able to do so while trying in the new tab.
Can somebody help me in getting rid of this. Is this because, the page is already loaded?
The "name" attribute is missing in the inputs. Without name you are not sending anything.

performing validations on p:dialog in JSF form

I am using p:message for doing validations in p:dialog which opend on a button click on the form. So my main form has two dialog boxes which open on button click and these two dialog boxes have a h:form in it.
In the main form I have two fields username and password so when the user enter empty values and clicks on submit the error messages are shown on the main form and the dialog also pops up with the error messages which should not be the behavior. I want the validations for the main form to be shown on the form only and the validations for the fields in the p:dialog to be shown in the p:dialog only. Could you help me on this?
Let me know if any more information is required.
One of the possibilities is to have a separate <p:message> component for every input in every form. This way only the relevant messages will be shown. Example:
<h:form>
<h:inputText id="value" ... />
<p:message for="value>
...
</h:form>
<p:dialog>
<h:form>
<h:inputText id="value" ... />
<p:message for="value>
...
</h:form>
<p:dialog>
If you'd like to have global messages displayed as well you could consider using a 'hovering' component like <p:growl> with globalOnly="true".

How can I make Alfresco YUI validate prepopulated input fields and avoid "keyup"?

I have a html form with some input fields that need validation:
<input type="text" id="hrs-edit-oib" name="oib">
I also have two validators on it. So with the new forms it works great. But with the prepopulated forms, it doesn't work.
I believe it is because the validators are set to work on a "keyup" event:
createEmployeeForm.addValidation("hrs-edit-oib", Alfresco.forms.validation.mandatory, null, "keyup");
Is there a way to tell the validator to process the form rigth away, if it has been prepopulated on the server side?
Here's an example:
I load a page with markup:
"<input type="text" name="myid" value="preloaded" id="myid" />
And lets say that the value of "myid" needs to be longer then two chars (which is the case here). But there was no keyup and my Save button is disabled until I click into that field and press tab or something.
Thanks

Categories

Resources