Adding Forms in Mura CMS with Simple Validation
Earlier today I recorded a brief demo of how to add forms in Mura CMS for Robert Rawlins who is starting to look into what the platform offers. One of the things I neglected to put in that demo was how to perform simple form validation. I've re-recorded my demo with the validation bit included. There's no audio since I'm at work, but just by watching you should catch on pretty easily. You'll probably want to go full screen with the video, it's hard to read when it's scaled down.
Comments
- Brian FitzGerald
hey Steve, this was handy to see. Thanks for sharing! I've been digging into custom forms w/ Mura as well. What do you personally do if you need to do some extra processing rather than just having the data sent in an email?
I found on the Mura forums today that you can use a hidden form field named "redirect_url" to send the form to a specific action for custom processing, but I'm wondering what solution others are using for this.
Cheers,
Brian
- January 28, 2010, 3:59 PM
- Steve Good
@Brian When I need to do some "heavier lifting" with my form data I'll either write a custom display object or a plugin. Pushing the collected data to Mura's form data collectors is pretty easy but not as intuitive as it could be. I will have something out soon-ish on how to post form data from a plugin to Mura's managed form data collections.
- January 28, 2010, 4:08 PM
- Brian FitzGerald
Ah, very good Steve. I'd love to see that! I still need to read up on plugins in Mura. Out of curiousity, when you write a "custom display object" as you mentioned above, I'm assuming you're saying you write a fully custom form in a .cfm file to function as a custom display object. So essentially a custom form.
With that said, do you use the hidden form field technique I mentioned above when you submit the form in order to do that "heavy lifting" in another .cfm file? Or is there another technique you use when submitting your custom form to ensure it invokes the correct code for processing?
Thanks for your insight,
Brian
- January 28, 2010, 5:10 PM
- Steve Good
Your assumption would be correct. A custom display object is just code you include in a mura page with [mura] tags and a special include function. I don't use the hidden field technique. I feel if I am writing the code for the form I'm probably doing something a little more complex than a contact form and a custom display object or plugin would be a better option. I'll see if I can get a good example of using a custom display object up tomorrow or Saturday.
- January 28, 2010, 9:48 PM
- Brian
I was wondering if it is possible to use cffforms format flash in MURA. Everything I've Tried thus far hasn't worked.
- March 12, 2010, 3:59 PM
- Matt Levine
@Brian,
To use cfform I would try adding the entire form with an include:
[mura]dspInclude('display_objects/custom/customForm.cfm')[/mura]
- April 6, 2010, 12:10 AM