Hello again, well, sorted the above issue, but I remember reading somewhere on this post I think it was that quotes mess the form up. Well I just experienced it, while trying to use the formatting buttons to insert an image. The image was inserted fine, but when you go to edit the form, the image field is really messed up by the quotes. Is there a way to escape the quotes?
Recently Rick Ellis linked to a post by Mark Boulton which outlines Mark’s use of EE to handle his Invoice/Estimate/Workflow needs. This inspired me to investigate a similar solution. I am relatively new to EE and thought if nothing else it would be a good learning experience.
-
My question stems from this article on the Wiki which references the Form Helper plugin. The Wiki article has a dire warning (in red) at the beginning of the article that basically warns if you follow the instructions you can foobar your EE install.
-
What I would like to know is whether this strong warning stems from the articles use of AJAX or if it is the Solspace plugin that can muck things up? I have read through this thread (and others) and know it is never mentioned as being dangerous but this Wiki article spooked me.
-
The thing is I don’t need the AJAX (it would be nice, but not necessary) and was wondering if that made it safer?
-
For example I have already set up a weblog (on my local testing server) called Contacts with custom fields and would like to be able to generate a page listing the Contact info along with an ‘Edit This’ link that takes you to an edit page using the Stand Alone Entry Form (SAEF) using Form Helper. I am mainly trying to gage the danger in doing this.
-
While on the subject, what is the easiest way to pass the entry_id to the edit form? I have read docs on URI Segments but still am not sure how to encode my ‘Edit This’ link or what code to place on edit form page. I have looked at the example included with the plugin and in the Wiki article but am not grokking something.
-
Thanks in advance for any help, opinions or advice.
I’m using quite a few SAEFs in a site I am currently developing. I’ve got Form Helper on a few of them to allow users to edit their entries (job listings, member company info, etc.). I hadn’t seen that wiki entry before - I don’t use any AJAX for my edit forms, and there’s really no reason you would need to unless it just floats your boat. Nothing about using Form Helper requires it. I messed around with AJAX quite a bit about 6 months ago, but it’s kind of like flash - it’s great for specific purposes but not necessary (and potentially confusing) for many situations. Accessibility is a potential problem with it as well…
I wouldn’t worry about form helper borking things. I think the reason they’re warning you is if you are editing a template you might want to roll back - I can’t really see anything in the wiki article that could screw something up (that you don’t do to yourself by changing your template). It’s just a plug-in and it works quite well. One tip: if you build your edit forms manually don’t forget to include formatting options as <input type="hidden">.
Passing the entry_id - if you wrap the edit buttons in a form and pass the entry_id in as a POST var, that would work (or a GET var but be careful as that won’t be as portable - it won’t work with servers that require the ‘Force URL query strings’ option to work.
So just turn on PHP parsing for the template and in your exp:weblog:entries tag have the form and add something like:
I’m going down the same river. I just wanted to have a list of editable entries, each title being linked to the “form helper” enabled edit form.
I assume that the entry_id would need to be passed in the URL but the example form doesn’t make this clear to me.
johnboat - 12 March 2007 02:03 PM
While on the subject, what is the easiest way to pass the entry_id to the edit form? I have read docs on URI Segments but still am not sure how to encode my ‘Edit This’ link or what code to place on edit form page. I have looked at the example included with the plugin and in the Wiki article but am not grokking something.
hi there, you do pass it through the url, then your edit form should include the validation. So on teh form helper example, they use i think it is called is_author or something like that. (The entire form is inside the is_author tag pair). This checks the author id of the entry, and compares it against the id of the person trying to edit it. If it is the same, it will let you edit.
I think (though I havent tried this), you could also pass the required member group id through the url, then use php to check that against the member’s member group, that way you could have several people able to edit it. Not sure that would work, but I am thinking there should be a way to do something like that..
I can’t figure out what I’m doing wrong. I’ve copied and pasted much of the example code into my form. I have an index template where all of the posts are visible, and an edit template that’s pulling in the values correctly into the each field that I want to edit. But when I hit Submit, I keep getting this error
Your weblog entry must have a title.
Can anybody help me understand why I’m getting this message, and more importantly how to fix it?
Okay, I figured out the above problem, but now when I hit Submit, nothing is edited. All of the information stays the same. Is there something specific you have to do for the content to be changed in the database? Here’s my code:
Update: Now all fields will update except the title field. Otherwise it’s working, so help with that title field would be great. Thanks!
John,
Thanks for the reply. I removed the lines that you referenced, but then I get an error “Your weblog must have a title”. So I’m guessing that at the very least, I need this line: