9 of 11
9
Standalone Edit Forms
Posted: 21 June 2006 02:52 PM   [ Ignore ]   [ # 145 ]  
Research Assistant
RankRankRank
Total Posts:  301
Joined  01-30-2003

Just a quick note. We released Freeform 2.2 today, the latest build of 2.2 encodes your email address.

solspace.com/software

mk

Profile
 
 
Posted: 21 June 2006 06:26 PM   [ Ignore ]   [ # 146 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1477
Joined  09-16-2004

Ask and ye shall be given smile
Will have to check it out, thanks Solspace!

 Signature 

Peace, e-man.
stookstudio.com, websites built with care and web standards. LinkedIn profile

Profile
 
 
Posted: 21 June 2006 10:44 PM   [ Ignore ]   [ # 147 ]  
Research Assistant
RankRankRank
Total Posts:  301
Joined  01-30-2003

Thanks for the input. Keep it coming. Down with spam.

mk

Profile
 
 
Posted: 23 January 2007 07:58 AM   [ Ignore ]   [ # 148 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  684
Joined  08-19-2006

* edit: the DST issue wasnt related to the form *

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?

Thanks

Patrick

 Signature 

Patrick TT
Aussie Freelancer

Profile
 
 
Posted: 12 March 2007 01:03 PM   [ Ignore ]   [ # 149 ]  
Grad Student
Avatar
Rank
Total Posts:  99
Joined  09-16-2006

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.

Profile
 
 
Posted: 12 March 2007 06:39 PM   [ Ignore ]   [ # 150 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  785
Joined  07-18-2006

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:

<input type="hidden" name="entry_id" value="{entry_id}" />

For the edit button(s).  Then you can take the POST var and use it in your edit form as needed…

Profile
 
 
Posted: 12 March 2007 07:24 PM   [ Ignore ]   [ # 151 ]  
Grad Student
Avatar
Rank
Total Posts:  99
Joined  09-16-2006

Thanks Brian, I appreciate the help & advice.

Profile
 
 
Posted: 26 March 2007 02:55 PM   [ Ignore ]   [ # 152 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  133
Joined  04-11-2003

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 01: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.

Profile
 
 
Posted: 26 March 2007 05:45 PM   [ Ignore ]   [ # 153 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  684
Joined  08-19-2006

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..

hope that helps

 Signature 

Patrick TT
Aussie Freelancer

Profile
 
 
Posted: 26 March 2007 07:58 PM   [ Ignore ]   [ # 154 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  133
Joined  04-11-2003

On my “pre_edit” template, this is how I have the entries marked up:

<a href=“http://mysite.com/index.php/developer/edit/{entry_id}”>{title}</a>

So after clicking to the editing template, do I use {segment_3} and if so, how?

Profile
 
 
Posted: 26 March 2007 11:21 PM   [ Ignore ]   [ # 155 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  684
Joined  08-19-2006

yep, you use segment_3. To do that, it just depends on where you want to put it. If you are displaying a specific entry, you would use:

{exp:weblog:entries weblog="weblog_name" entry_id="{segment_3}"}

If you are using it in the form to pass the entry id, you use

<input type="hidden" name="entry_id" value="{segment_3}" />

Patrick

 Signature 

Patrick TT
Aussie Freelancer

Profile
 
 
Posted: 27 April 2007 01:27 PM   [ Ignore ]   [ # 156 ]  
Lab Assistant
RankRank
Total Posts:  102
Joined  07-13-2006

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?

Thanks!

Profile
 
 
Posted: 27 April 2007 01:45 PM   [ Ignore ]   [ # 157 ]  
Lab Assistant
RankRank
Total Posts:  102
Joined  07-13-2006

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!


{exp:weblog:entries weblog="{my_weblog}" rdf="off"}


{exp
:weblog:entry_form weblog="{my_weblog}" return="newsfeed/edit/{entry_id}"}

<input type="hidden" name="entry_id" value="{entry_id}" />
<
input type="hidden" name="title" value="{title}" />
<
input type="hidden" name="entry_date" value="{entry_date format='%Y-%m-%d %g:%i %A'}" />

{exp:cal_saef:calendar name="entry_date"}
{calendar}
{clear_link} {today_link}
{
/exp:cal_saef:calendar}

Date
<input type="text" name="entry_date" value="{entry_date format='%Y-%m-%d %g:%i %A'}" maxlength="23" size="25"  />


<
p><strong>{title}</strong><br />
{newsfeed_desc}<br />
{newsfeed_tag}
</p>


<
p>Title<br />
<
input type="text" name="{exp:form_helper:field_grabber field_name='title'}" id="title" value="{title}" size="50" maxlength="100" /></p>
<
input type="hidden" name="{exp:form_helper:field_grabber field_name='title' which='format'}" value="br" />

<
p>Link URL<br />
<
input type="text" name="{exp:form_helper:field_grabber field_name='newsfeed_link'}" id="link" value="{newsfeed_link}" size="50" maxlength="100" /></p>
<
input type="hidden" name="{exp:form_helper:field_grabber field_name='newsfeed_link' which='format'}"  value="br" />

<
p>Short Description<br />
<
textarea name="{exp:form_helper:field_grabber field_name='newsfeed_desc'}" dir="{text_direction}" cols="50" rows="8" onclick="setFieldName(this.name)">{exp:form_helper:field_parser}{newsfeed_desc}{/exp:form_helper:field_parser}</textarea>
<
input type="hidden" name="{exp:form_helper:field_grabber field_name='newsfeed_desc' which='format'}" value="br" />
</
p>


<
p>Tags<br />
<
input type="text" name="{exp:form_helper:field_grabber field_name='newsfeed_tag'}" id="tags" value="{newsfeed_tag}" size="50" maxlength="100" /></p>
<
input type="hidden" name="{exp:form_helper:field_grabber field_name='newsfeed_tag' which='format'}" value="br" />


<
input type="submit" name="submit" value="Submit" />
<
input type="submit" name="preview" value="Preview" />



{/exp:weblog:entry_form}
{
/exp:weblog:entries}

Profile
 
 
Posted: 27 April 2007 03:21 PM   [ Ignore ]   [ # 158 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  314
Joined  05-26-2004

If you want to be able to change the Title and the Entry Date with your edit form, you don’t need these two lines

<input type="hidden" name="title" value="{title}" />
<
input type="hidden" name="entry_date" value="{entry_date format='%Y-%m-%d %g:%i %A'}" />

I would try taking them out first. If you still have problems, post again.

 Signature 

...for there is no way to reduce a hunter to economic dependence and make him hunt for you - Albert Jay Nock ~ “Our Enemy the State”

Profile
 
 
Posted: 27 April 2007 07:03 PM   [ Ignore ]   [ # 159 ]  
Lab Assistant
RankRank
Total Posts:  102
Joined  07-13-2006

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:

<input type="hidden" name="title" value="{title}" />

Any other thoughts?

Profile
 
 
Posted: 28 April 2007 01:12 AM   [ Ignore ]   [ # 160 ]  
Research Assistant
Avatar
RankRankRank
Total Posts:  314
Joined  05-26-2004

Instead of your code for the entry field:

<input type="text" name="{exp:form_helper:field_grabber field_name='title'}" id="title" value="{title}" size="50" maxlength="100" /></p>

try this

<input style="width:40%" type="text" name="title" value="{title}" />

It is what I use and it works for me. I tried your code as above and I get the same error, so it may be a bug.

Would you let Solspace know? Maybe he has a different explanation.

 Signature 

...for there is no way to reduce a hunter to economic dependence and make him hunt for you - Albert Jay Nock ~ “Our Enemy the State”

Profile
 
 
Posted: 28 April 2007 07:08 AM   [ Ignore ]   [ # 161 ]  
Lab Assistant
RankRank
Total Posts:  102
Joined  07-13-2006

John,
That worked perfectly. Thanks!

Profile
 
 
Posted: 11 May 2007 10:45 PM   [ Ignore ]   [ # 162 ]  
Grad Student
Rank
Total Posts:  76
Joined  02-23-2007

Hi solspace, may i know if Form Helper supports relationship entries? I don’t see any examples in this thread, and in the sample file.

Profile
 
 
   
9 of 11
9
 
‹‹ empty new blog      MoBlog Auto Check? ››
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 66473 Total Logged-in Users: 37
Total Topics: 84877 Total Anonymous Users: 21
Total Replies: 455400 Total Guests: 236
Total Posts: 540277    
Members ( View Memberlist )