1 of 2
1
Content Views Change After Using Form Helper to edit content
Posted: 10 April 2008 09:42 AM   [ Ignore ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  106
Joined  2008-03-04

Hi,

Looks like a slow day on the Forum. That of course is about to change.

I have been working with Form Helper to modify two custom fields of a form. The changes take place, but when I try and view the changed entry in the comments/title_url page, nothing shows up except the comment window. A view in the CP shows that the data is still all there, but for some reason it won’t show up the same way a non-edited entry would.

I have attached the form helper template that I created so you can see the code. I hope you can assist in bringing this information back to view.

Thanks,

Forrest

File Attachments
orders_edit_request.html.zip  (File Size: 3KB - Downloads: 37)
Profile
 
 
Posted: 10 April 2008 10:17 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2733
Joined  2006-10-18

Forrest,

Your hidden field for Status isn’t properly commented out (it should also appear as...):

{!-- <input type="hidden" name="entry_status" value="{entry_status}" /> --}

to

<!-- <input type="hidden" name="status" value="{status}" /> -->

Also, your category hidden field is incorrect:

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

to

{categories}<input type="hidden" name="category[]" value="{category_id}" />{/categories}

If you check out the entries through the CP, you’ll probably find that any entries submitted through that form have no category and an incorrect status. smile

 Signature 
Profile
 
 
Posted: 10 April 2008 10:38 AM   [ Ignore ]   [ # 2 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  106
Joined  2008-03-04

Hi,

Thanks for the reply. I made the changes and still have the same results. You are correct on the category, but the status does show up.

Do I have this section right:

{exp:form_helper:statuses entry_id="{entry_id}"}
<option value='{entry_status}' {checked}>{entry_status}</option>
{/exp:form_helper:statuses}

or should it be status instead of entry_status?

Thanks.

Forrest

Profile
 
 
Posted: 10 April 2008 10:41 AM   [ Ignore ]   [ # 3 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2733
Joined  2006-10-18

No, that’s right because it’s running it’s own loop with it’s own variable wink

So you’ve tried editing a “fresh” entry and no luck again? smile

 Signature 
Profile
 
 
Posted: 10 April 2008 11:06 AM   [ Ignore ]   [ # 4 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  106
Joined  2008-03-04

Correct. I get the same results.

Let me explain what I am doing in greater detail and you can see if maybe there is something else that may be causing the problem.

I have a web form called request that a member must log in to use. They can enter data for a request that uses about 15 custom fields. That submission generates an email with a link to the new entry to a moderator. The moderator opens this file in the “edit_request” form. This is the document I sent to you above. There are only two fields that need to be changed here: the author field and the status.

Submitting this form should allow it to be viewed in the comments template, but this is where it flakes out. I can view the data in a “summary view” template but when I open it in the comments template it breaks. It is funny because the fresh entries open without difficulty in the comments template, but edited ones do not. I have attached the comments template just in case.

Thanks,

Forrest

File Attachments
orders_comments.html.zip  (File Size: 3KB - Downloads: 55)
Profile
 
 
Posted: 10 April 2008 11:16 AM   [ Ignore ]   [ # 5 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2733
Joined  2006-10-18

Forrest,

Which statuses are you using, and at which points are they switched to which status?

Haha, hope that makes sense LOL

 Signature 
Profile
 
 
Posted: 10 April 2008 11:21 AM   [ Ignore ]   [ # 6 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  106
Joined  2008-03-04

Here is my list:

Open
Approved
Rejected
Vendor Accepted
Vendor Rejected
Repairs in Process
Repairs Completed
Invoice Submitted
Paid
Closed

The entry naturally defaults to open and the plan is to have the option to change it each time a comment is submitted.

Hope this helps. Please let me know if you need more details.

Thanks.

Profile
 
 
Posted: 10 April 2008 11:25 AM   [ Ignore ]   [ # 7 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2733
Joined  2006-10-18

Your comments page weblog:entries loop should have this for the status= parameter: smile

status="Open|Approved|Rejected|Vendor Accepted|Vendor Rejected|Repairs in Process|Repairs Completed|Invoice Submitted|Paid|Closed"

 Signature 
Profile
 
 
Posted: 10 April 2008 11:34 AM   [ Ignore ]   [ # 8 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  106
Joined  2008-03-04

I don’t want to overstate anything, but in my book you are a genius. It works. What more can I say?

Thanks. Forrest

Profile
 
 
Posted: 10 April 2008 11:38 AM   [ Ignore ]   [ # 9 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2733
Joined  2006-10-18
fanderson - 10 April 2008 11:34 AM

I don’t want to overstate anything, but in my book you are a genius.

Haha, that’s makes ONE of you LOL cheese

I noticed that you did not have the status parameter in your entries loop, and, in theory, you would think that it will not filter entries by status… right?
Wrong. rasberry If the status parameter is not there, it will only show OPEN by default wink

One of the few parameters that work that way.

 Signature 
Profile
 
 
Posted: 10 April 2008 11:46 AM   [ Ignore ]   [ # 10 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  106
Joined  2008-03-04

Obviously, I just need more exposure to the ins and outs of EE. It is really nice to have your assistance getting over the first series of hurdles!

EE is loads of fun. BTW you have my vote for the Webby.

Thanks.

Profile
 
 
Posted: 10 April 2008 11:53 AM   [ Ignore ]   [ # 11 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  106
Joined  2008-03-04

Sorry, but now I have one more question about integrating the edit into the comments page. Do I need to wrap the whole page in this code:

{exp:weblog:entries rdf="off" show_future_entries="yes" show_expired="yes"}
{exp
:weblog:entry_form weblog="work_order" return="orders/comments/{url_title}"}

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

or can I just insert it in the body?

Thanks.

Profile
 
 
Posted: 10 April 2008 12:05 PM   [ Ignore ]   [ # 12 ]
Administrator
Avatar
RankRankRankRank
Total Posts:  2733
Joined  2006-10-18

If you’re creating an edit form on the Comments template or anywhere for that matter, those loops need to be around it smile

If you wanted to just edit one field or something, you could actually stuff your EDIT code in with the comments template weblog:entries loop with only this loop:

{exp:weblog:entry_form weblog="work_order" return="orders/comments/{url_title}"}
code
{
/exp:weblog:entry_form}

As it’s already within the weblog:entries loop… sharing wink

 Signature 
Profile
 
 
Posted: 10 April 2008 12:20 PM   [ Ignore ]   [ # 13 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  106
Joined  2008-03-04

I have done something wrong here. I placed the status code in the comments area but then I get an ugly error in the comment area of the page:

The current status is {status}. Do you need to change the status?
{{NOCACHE_WEBLOG_FORM weblog="work_order" return="orders/comments/{url_title}" }} {

} {/NOCACHE_FORM}

I have attached the comments template. The status change option is almost at the very bottom.

Obviously there is something out of place. Can you assist?

Thanks.

File Attachments
orders_comments-1.html.zip  (File Size: 3KB - Downloads: 53)
Profile
 
 
Posted: 11 April 2008 05:07 AM   [ Ignore ]   [ # 14 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  106
Joined  2008-03-04

Good morning. I hope you will have a chance to review this.

Thanks.

Forrest

Profile
 
 
Posted: 11 April 2008 06:00 AM   [ Ignore ]   [ # 15 ]
Sr. Member
Avatar
RankRankRankRank
Total Posts:  106
Joined  2008-03-04

The more I work on this, the better it gets. I now have the code in place and working but the drop down button defaults to Open even though the record shows that the status changes. Is there a coding way to indicate the current status in the drop down?

Thanks.

Profile
 
 
   
1 of 2
1