differentiation between form and upload Form in grails - forms

I am little bit new to grails and I don't know the difference between form and uploadForm in grails, and if use upload form I can able send attachment file to grails controller. But not able to send attachment file when using form.Someone explain the difference of those form types.

One of the best places to look is the documentation for both of these (form and uploadForm).
As stated in the documentation regarding uploadForm:
Identical to the standard form tag except that it sets the enctype
attribute to "multipart/form-data" automatically.

Related

$mail -> where to put?

This seems to be the canonical way of sending emails in TYPO3.
I have access to the back-end of a typo3 installation via my browser. I have written some HTML code that I want to incorporate into the website via the "plain HTML" widget. That HTML code lets the user input some data. I want to send that data via email. Now I read the above tutorial and I'm asking myself where they want me to put that code? I mean that $GLOBALS stuff and further down that $mail stuff.
The documentation is a developer guide, thus you'll need to implement a plugin or similar with a controller or handler which contains this code.
However, with TYPO3v8 you can easily create forms with the form extension which also allows you to send mails. This is a lot easier if you are not a developer. (The email finisher of the form extension also uses the TYPO3 mailing API of course.)

Joomla Contact Form (from the ground up)

I'm looking to create a customized contact form in a Joomla 3 site I have created. I know how to write the php code for the form, but I'm unsure of where to place the code.
Ok, the form is located at http://www.theoscorner.com/contact-us. What you see there is only the design, and there is currently no script for the form to submit to. If I wanted to create a new php page for the form to submit to, what is the best method of doing this? For example:
Should I create a completely new php file where the template's index.php file sits, and use a module (instead of an article) to hold the form.
Should I create a new article page, and place my php script in that article?
Should I hard-code my form into a module, and place a php function at the end of the index.php page which gets called when the page is refreshed and the POST values are set.
I'm just looking for any type of guidance I can get right now. I don't want to use a third-party plugin, because I want a little more control than they allow. Thank you for your time.
Just use RS Forms or Contact Enhanced, they are both Joomla extensions available on extensions.joomla.org
There is no need to create your own MVC component.

Keycloak's FreeMarker email template

I'm using Keycloak to send a forgot password email, and from what I've read on their docs and the FreeMarker docs, it seems like I should be able to use HTML tags just fine. However, when I use them in the password-rest.ftl file, it renders the whole tag like so:
<p>Some Text</p>
instead of just showing: Some Text
I found this (https://issues.jboss.org/browse/KEYCLOAK-681) saying that Keycloak can only send plain text emails, and I just wanted to see if anyone knew for sure since I have found some stuff that looks like the HTML tags should be usable How do you block emails from appearing as links in FreeMarker?
Any advice or thoughts on this would be greatly appreciated.
There are two sub-directories containing templates for emails. They are called text and html. When you want HTML you need to edit templates located in html directory.
Keycloak itself sends emails as multi-part messages containing both plain-text and HTML versions - email client decides which one is displayed.
I am not familiar with Keycloak, but somehow you should set the Mime type of your e-mail to "text/html" (e.g. have a look at this Stack Overflow answer).
Which version of Keycloak are you using? Comparing the source code of 'FreeMarkerEmailProvider' in tag 1.2.0.Final and on branch 1.3.x lets me assume that Keycloak is able to handle text/html at least from version 1.3.x on.
But again: I am not familiar with Keycloak...

Drupal email file attachment on form submit

I have a form built into a block on one of my content types, the content type has a file connected to the node.
I currently have a form the will send an email to the address you put in with a default message (ie if you put into the form, me#myemail.com, this email will receive a message saying "thank you for your interest.. ..please find your document attached" etc) However I'm struggling when it comes to attaching the file attachment of that node to the form, I have downloaded the mimemail module but there isn't a lot of documentation on how to do it.
(I apologise for repeating this question from the Drupal specific SO but this area seems to get more traffic)
Firstly, I would recommend you transition to webform rather than your own bespoke solution - as great and admirable as that is.
In looking around for a webform strategy to test and recommend, I found something that should do the job for you.
Have a look at this tutorial.

Symfony2 get search via forms and links

In Symfony 2 I tried to create a little search engine. The search consists of a form and some links (like facets on solr). I managed to set up the search form with form binding, creating special searchobject class in entitiess and all this via form post request. For purpose of saving previous searches I saved the complete search object in session serialized.
My question(s) would be:
How to use get requests with a form without outputting form name? Is using forms via get valid in Symfony 2? What is the best practice?
Many sites made with Symfony 2 I see are using www.url.com/search?q=thequery&param2=xxx.
If it's valid, how would I prefill the form? Are there some examples to look at?
(PS: if using the form the way it works now, the url stays the same eg. www.url.com/seach)
Just try to change you html form declaration to specify method="GET".
And that's all, you can create your form as usual. :)