We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Beginner - form/controller for public side?

Development and Programming

tunesmith's avatar
tunesmith
31 posts
15 years ago
tunesmith's avatar tunesmith

Hi, it seems this should be easy to find in the documentation but I haven’t found it. I have a working EE installation, but we’re making it a membership site and we want to add some extra functionality for the users. These are logged-in users of the public site, not users that have access to the control panel. We want an extra layer of custom apps for the users - forms, validation, stuff requiring new database tables, etc.

I already have code igniter experience. But what I don’t understand is how to hook them together. Specifically, if I put a form in an EE template, what do I put in the form “action”, how do I control the routing so it goes to my custom controller, and where do I put the code igniter app I’m writing for it?

I skimmed through the documentation for EE modules but it seems more for control panel functionality, and not for public-side stuff.

       
chichilatte's avatar
chichilatte
43 posts
15 years ago
chichilatte's avatar chichilatte

Hi tunesmith. The standard way to add forms to your site is to use the SAEF (stand alone entry form) which is a load of crap. I’ve been using the SafeCracker addon which allows you to have complex custom fields on the frontend of your site. It’s a commercial addon and it’s pretty new, so it’s not perfect, but the support is excellent.

http://devot-ee.com/add-ons/safecracker/

If you want to do your own validation and extra code beyond what safecracker or EE can do, i think your best bet is to write a quick extension which listens out for hooks, e.g. i made a custom extension which listens to the Solspace User (it’s a great addon for front-side member management) hook “user_register_end”, which lets me do stuff when a user has applied for membership on the frontside.

Extensions are pretty easy to make if you know your php at all (they can be just one little php file), and there are a good 150 hooks which you can choose from to add your own functionality.

http://ellislab.com/expressionengine/user-guide/development/extensions.html

       
tunesmith's avatar
tunesmith
31 posts
15 years ago
tunesmith's avatar tunesmith

I’m specifically looking for how to do my own full request cycle development for applications that can live within an expression engine installation. SAEF doesn’t work because it submits entries to existing channels. SafeCracker also looks to be associated with channel entries.

The extensions look like they could be helpful for calling utility methods, thanks. I’m looking for something that can handle bigger chunks of functionality, though. I’m actually a senior-level php developer, have worked with multiple php frameworks like codeigniter, symfony, etc - I’m just trying to find what is considered the “right way” to create php applications for EE, which is still new to me. For instance, users that want to record and edit financial data associated with their accounts, a system periodically asks survey questions of logged-in users, a system that awards points based off of how correctly they answer the survey questions, or any other number of highly custom application-level tasks that will just happen to be part of an expression engine site.

I found one thing that looks like it might be a help:

http://www.toddperkins.net/add-ons/entry/custom_ee_form

I also found this:

http://ellislab.com/forums/viewthread/137899/#698892

but I’m not sure if either of these are the Best way yet.

I know there are other people out there writing very custom functionality for sites that host expression engine, I’d love to hear any clarification from them. Just imagine you have a code igniter site and your client decided they wanted to glom it on to expression engine so they could more easily edit the UI layer - how would you integrate actual custom level full MVC functionality into Expression Engine?

       
Rob Sanchez's avatar
Rob Sanchez
335 posts
15 years ago
Rob Sanchez's avatar Rob Sanchez

Your best bet is creating a custom module (http://ellislab.com/expressionengine/user-guide/development/module_tutorial.html). With a module, you can create EE tags to build your forms. You can also create module actions that correspond to your forms. You can create your own custom models and package them with your module, if necessary. The module action would be your controller, and the template where you housed your form tag would be your view.

       
tunesmith's avatar
tunesmith
31 posts
15 years ago
tunesmith's avatar tunesmith

Great, thanks - it was a relief to find that example module - things started looking like CI again. 😊

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.