Joomla Contact Form (from the ground up) - forms

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.

Related

textarea and jsp

I have a textarea that I first print some values coming from a request.getParameter("some_textarea_name"). The user is allowed to modify those values and then I want to get the new values and replace the old ones with the new ones so as to query the new ones and get the results from my database tables. Can I do that without redirecting the user to a new page e.g without using the <form method> and the request.getParameter()
Can I do that without redirecting the user
Yes, you can implement an ajax call that will submit the form without redirecting the user and you can do something with the response (perhaps add it to the page).
If you need help using ajax follow this tutorial, but be aware that it implements AJAX in pure javascript (its a bit more bloated / complicated). If you want to keep it simple look into jQuery ajax, and here is a tutorial too.
without using the
No, you need to use the form to be submitted, however if you use ajax you wont need to redirect the user.

Form (phpmailer) in joomla error

I'm having the following problem, i created a folder (named 'forms') to storage the files of phpmailer, then i have to put the action in the form this way: action="forms/mail.php".
But when i tried the form it open a not found page e in the url it appears this: "perfilo/index.php/forms/mail.php", i tried to delete the part "index.php/" and execute the script and it looks like would work without it.
Can anyone tell me how to get rid of this "index.php/" part? Am i doing something wrong or what?
Thanks
You are on the wrong track.
Search for documentation on using Joomla! Mailer.
Some resources to get you started:
JFactory/getMailer
How To Send Email from Your Joomla Extension
You are on the wrong path.
In joomla you need to implement a contact form.You can implement it like following.
Joomla Provides you a default component com_contact Any of the files from com_contact\views\contact\tmpl\ or you can create new layout with your custom design.
And you can access the files in url via wwww.domain.com/index.php?option=com_contact&view=contact&layout=default or your custom layout.
then joomla itself providing some forms if you want to customize that you can do that too.
The action they set in the form to contact controller. and sending the mail.
I got your point of view you are trying to create custom design and set it as article .
If you want to follow your own method.
You can work like this.
the form action leave as empty.
and onclick you have to set the action via jquery and then submit
Hope this may solve your issues

Creating a form in confluence

I can create forms via templates with no problem. I found a plugin (create-page) from Adaptavist that allows you to create pages from a template. When a user clicks the create-page macro link it creates/saves the page from the template without allowing the user to change the fields.
I want the create-page macro to allow the user to fill in the form fields before saving the new page.
Is there a way to do this with this macro or perhaps there's another way of doing this?
You can try out ConfiForms plugin for Confluence. Quite easy to use.
The form-mail macro from Adaptavist was the answer. It allows you to create email forms inside your pages. Mail form NG plugin is free to use up to version 3.03 for Confluence up to version 5.3.4

ASP Classic - Passing form data to Iframe

I'm looking to pass data from a form into an iFrame, but I have a slight problem.
The form page I can edit with no restrictions
The page I send the data to I cannot edit unless its html or JavaScript
The data needs to end up in an iframe within this page, which I can edit with no restrictions
I'm incorporating a search function into a CMS system which is why I cannot edit the iframe's parent page, and why I am using iframes at all.
At the moment the data sends to the parent page but is not picked up within the iframe, I am sending via the POST method.
I got it..
Added and extra page which converted the post data into session data,
if anyone knows a better way i would like to hear it though.
And they are the same domain, but editing the CMS system would have taken ages to look through as its not mainstream or developed by me.
Maybe I'm oversimplifying the problem, but can't you use the "target" attribute of the form tag to post to the Iframe?

Multiple Contact Forms on Magento

I'm looking to create a new contact form for enquiries on Magento. Creating a module from scratch for this seems like a bit of a waste of time. Does anyone know the most sensible and quickest way for this to happen?
Thanks!
In CMS>Manage Pages create and enable a new page (or you could use a static block) e.g. call the page My Contact Form with a url ID of my-contact-form and a layout that matches your theme. For the content of the new page add
{{block type='core/template' template='contacts/mycontactform.phtml'}}
Now in your template folder (app/design/frontend/default/default/template/contacts for default theme in Magento 1.3.x) copy the existing form.phtml file, rename it to mycontactform.phtml and copy it back to the contacts folder. Edit the new mycontactform.phtml code and html as you wish to create your new contact form.
Load the new form by going to http://www.example.com/my-contact-form
Hope that helps...
In adendum to paj answer: You also have to edit the email template to include whatever new fields you just added.
Keep in mind that both your new contact form and Magento original contact form (an whatever future contact forms you may add in the future with in this way) will all use the same email template.
So in order to have meaningful emails sent, you need to "program" the template using the {{depend}} directive