Hello I'm trying to include in a modal a custom form (is not a BizKentico Form) when it is rendered the tag <form> is missing and when click submit buttom it realod the page and lose de input data before.
Are you using Portal engine or MVC?
If you are using Portal, Kentico wraps the entire page in a form tag. You can hack it buy doing something like this, but it may cause some issues on the page.
</form>
<form>
your form data
</form>
<form>
Related
I have two mail forms on one page but the second form just submits the first one. Are there some settings or typoscript I can add to make this work properly?
Have a look at the form wizard. In the tab "Form" you can overwrite the field "Prefix". TYPO3 uses this value in the submit button, like this:
<input id="field-10" value="Send" name="tx_form_form[my_prefix][10]" type="submit">
If you enter different prefixes for your forms, the submit buttons should know which one to submit.
Has anyone successfully created an Adaptive Form as a component that can go into an AEM page? OOTB, the form is its own page template. Wondering if any Ninjas have accomplished this!
So we ended up creating a container component, with a configurable path to include the Adaptive form you want on the page.
<div>
<cq:include path="${properties.path}/jcr:content/guideContainer" resourceType="fd/af/components/guideContainer"/>
</div>
We also created a custom form page and template styled to work within the component and subsequent page.
Okay so I have a basic webpage that just load a simple form.
This form submits a text field, a radio button selection. Very simple.
It sends it to a webpage that uses the data and displays a webpage based on the data.
What I am wondering is how can I submit this data to the webpage, which is located on a different server, and display what that webpage would then display inside of an Iframe.
The reason I ask is I just wish to have an iframe that has almost like a header that stays anchored at the top of their resulting webpage with an advertisement.
Hopefully this is clear enough. I just can't seem to find what I am looking for :(
Thanks everyone!
Are you looking for this? The form will targeted to the iframe with the domain http://example.com and also take its post value
<form action="#" method="post" target="iframe_name">
<input type="submit" name="post" value="Post">
</form>
<iframe src="http://example.com" name="iframe_name"></iframe>
I have a site hosted with Shopify. I would like to implement a form that posts to an external url. This is a custom form. My original thought is that I could just create a new page and add a form similar to these examples here - http://wiki.shopify.com/Contact_And_Signup_Forms#Signup_Forms
But, I don't see an option to post to an external url. I am completely new to Shopify. I had hoped that being a rails programmer would have helped, but it looks like I need to work with the liquid template system and not rails.
Any assistance would be appreciated.
Instead of using the liquid form tag, just use straight HTML and specify an action for your form that points to an external URL.
Example:
<form action="http://your-url.com" method="post">
<input type="text" name="email_address">
<input type="submit" value="Go!">
</form>
The above example will POST to http://your-url.com.
I need to have a form submitted using the enter key, however, I have to use a BUTTON instead of SUBMIT as the type in order for the page to not refresh. How can I get my BUTTON to act as a SUBMIT and be executed whenever someone pushes their enter key?
<form>
<input type=text ...>
<input type=button ...>
</form>
A lot of the information I found about this mentions Netscape/IE/lots of outdated material.
This is my HTML output, I'm looking to hide the submit button and use ENTER:
http://i.stack.imgur.com/Ohepe.png
with Javascript enabled
<input type="button" onclick="this.form.submit()" ... />
should work
I have to use a BUTTON instead of SUBMIT as the type in order for the page to not refresh
Nah. Use a normal submit button that refreshes the page. (And ideally, for accessibility, make it work!) Then add progressive enhancement to replace the submission action of the form with something smoother when JS is available. Use return false (or event.preventDefault() in the DOM 2 Events model) to stop the form submitting in this case.
<form id="foo" method="POST" action="dosomething.script">
...
<input type="submit" value="Do something"/>
</form>
document.getElement('foo').onsubmit= function() {
beginAJAXSubmission();
return false;
};
Catching the submit event of a form is generally better than trying to pick up click on buttons, because it will always fire when the form would normally be submitted, including on Enter keypresses. click on the first submit button in a form will usually be fired on an Enter keypress, but there are cases (depending on number of controls in the form and what browser it is) where it doesn't happen and so you can end up falling through to actually submitting the form.
as other said, you have to use Javascript. I recommend JQuery framework.
But i don't understand the refresh thing?
Normal way is you hit submit and your form will be sent over a request to the server.
Server process the data and return a response (HTML/JSon..etc) this response will normally be redirect to a result page (to avoid the famous warning about re-post on refresh).
Now if your form is only a little piece of a bigger page, you might want to use ajax to post the little form and then take the result and update your DOM.
All this said, nothing prevent you to use submit type for the button, it is actually the best way to make your enter key defaut to this action. All you have to do is to use Jquery and intercept the submit of your form and make an ajax call instead of going the normal way.
you will find plenty of example to use JQuery since its probably the most used javascript framework.
Hope it help