External Forms File Location6 users found helpful
1. Make a new directory in the blocks/ directory in your root install, named "external_form".
2. Go into concrete/blocks/external_form/ and copy the "forms/" directory from there into the directory you just made.
3. You'll notice two files in there now, test_form.php and controllers/test_form.php. Change that to whatever you'd like your new form to be called (e.g. "contact_us.php" for both filenames.)
4. Open controllers/contact_us.php, and change
Now, edit your site, and add an external form to a page. You should now see "Contact Us" as a form in the list. Add that to a page, and you should see your new form. You can edit the HTML in blocks/external_form/forms/contact_us.php, and edit what happens automatically when the form submits by modifying the action methods inside the controller. Whatever action you give your form (by default it's "test_search" will automatically run, when submit, the function that has the same name with action_ in front of it.
So, if you change your form to submit to <?=$this->action('process_contact_form')?>, you'll just need to create a method in your controller named action_process_contact_form - and it should run automatically.
Hope this helps!
I've attached a zipped copy of what you'd find in the concrete/blocks/external_form/forms/ directory. You should be able to create blocks/external_form/forms/ in your local directory and use these as a starting point (Let me know if this doesn't work.)
You're touching on something I have been trying to figure out! I am implementing several concrete5 CMS's for different clients. I have customized the core app, and don't want to have to customize it each time (or copy the same files over, etc.) whenever setting up a new client.
How can I also have ONE central c5 installation, that all CMS's reference, so that I only have to keep one version customized, and up-to-date?
I resell hosting for hostmysite.com... but, as a developer I deploy a lot of this stuff.
I am a hosting company, but I don't actually have servers in the basement.
My guess is our stringent approval committee would probably grant you membership.
Would I have the option of being a Hosting partner or a Services partner? (also, is it just one or the other?)
We are proudly offering a 10% discount on joining both plans at once however.
Is this possible? What is involved to get this done??
on your host, move the siteA.com/concrete to /concrete_core (just an example to make it obvious)
then remove all the concrete directories in all other sites. then go to each site create a hard link to concrete_core
ln -s /concrete_core concrete
So I have a copy of the forms folder from concrete\blocks\external_form in the block\external\blocks\external_form
I have checked permissions to be owned as they should and on the php scripts are -wr-r--r--
Is there something I am missing?
i have a little Problem. I need a img on my external form, but $this->getThemePath() give not the correct Path to my Site Themes.
What is the correct Way ?
This is my first time tring C5.
What can I do with the labels and the error messages for the diffrent languages? I don't understand the technic/logic behind this mechanism in C5 - THX
I am trying to create external forms but unable to. I tried the steps that Andrew has given above but cannot do it. I am unable to open the attachment he provided also.
Can anyone help me?
It rolls back a page that you might've messed up trying to get an external form on it.
Sorry for not being clear enough but step two in Andrew's post is what I am having trouble with. How can I find this location from the Website? I think if I knew how to locate it I might finally get the hang of these External Forms.
I didn't mess up a page so I don't need to roll back.
Sorry if the above sounds too simple but I'm not very tech savvy.
When you find your ROOT, it contains many folders:
blocks/ concrete/ config/ controllers/ css/ elements/ files/ ...many others...
I assume you found your ROOT because you didn't have trouble with andrew's step 1, where he says to create a directory in blocks/ called 'external_form'.
So now go back to your ROOT.
In step 2 he says to click into concrete/blocks/external_form/ and copy the folder in there called 'forms'.
So from your ROOT, click into concrete/ then into blocks/ then into external_form/ and right-click the 'forms' folder and select Copy.
You'll paste this into the 'external_form' folder you created in step 1. So go back to your ROOT, click into blocks/ and then external_form/. Go to the Edit menu in the top left corner of your screen and select Paste. You should now see a folder called 'forms' and can continue on to step 3.
Ultimately I'll bet the confusion came from having to go back to your ROOT. If you click into the concrete/ directory from your ROOT, you'll see it looks exactly the same as your ROOT - it contains all the same folders. These are all the default source files that make your site function. It would be dangerous to edit those files directly and potentially break something that you can't fix without reinstalling Concrete5. So andrew's step 2 is basically making a copy of these source files in your ROOT so that you can work on them without causing irreparable damage to your Concrete5 installation.
It's like in Photoshop, when you start editing a photo it's always best to duplicate the original in a new layerso if you royally mess up, you still have the unedited base layer.
Sorry but didn't get past step 1 :-/
what would a good "action" call/class look like? the contact form uses "submit_form" can you reuse this?
Any input would be welcome.
Check it out here:
A bit pedantic I know but in my case I didn't realise this and it cost me some time :-)
How I can manage through the Dashboard?
directly from the file system. There's no way to manage them through
CEO - concrete5.org