1

I have a Channel Form set up which is working fine and inserting entries into a Channel with the default status.

Now there is a requirement to allow the status to be changed when creating the entry via the Channel Form but for the life of me I can't get it to work.

I have tried using the Channel Form {status} tags and also tried hardcoding the select drop down but no matter what I do the default status is applied.

Here's the EE tag version

<select id="status" name="status">
{statuses}
    <option value="{status}"{selected}>{status}</option>
{/statuses}
</select>

And here's the HTML

<select name="status">
    <option value="Pending">Pending</option>
    <option value="Approved">Approved</option>
    <option value="Declined">Declined</option>
</select>

The only thing I can think of is that I'm trying to set a custom status and not the normal "open" or "closed". Even using standard "open" and "closed" (via the EE generated drop down) doesn't work.

The site is using EE 2.9.0.

Has anyone run into this problem?

1
  • I confirm that the issue has not been fixed as of 2.11.3 The channel form always sets the status to open, irrespective of the status set to any custom status.
    – Noor M
    Commented Nov 25, 2016 at 12:34

4 Answers 4

1

I've encountered exactly the same problem with 2.10.1. No matter what I set the status to, it always writes as 'Open'. I'm sure I've got the proper group assigned and title-casing for 'Pending'... I can only conclude it's a system bug.

2
  • Please expand; did you file a bug report? Did you dig through the core to see if this is a bug?
    – jrothafer
    Commented Sep 20, 2015 at 18:49
  • No, since the report was already filed. But it reports "fixed", even though it hasn't been fixed in 2.10.1. Commented Sep 24, 2015 at 14:21
0

Silly question, but you're sure the custom status group is assigned to that channel, right?

Have you tried {status_menu} ?

https://ellislab.com/expressionengine/user-guide/add-ons/channel/channel_form/#status

Although the second code you tried looks like it should work.

6
  • Yes, it's all hooked up OK and works fine from the back end. Everything else works in the Channel Form, I just can't set the status. I'm using an add-on to allow setting the author so I wonder if that might be the problem.
    – foamcow
    Commented Oct 10, 2014 at 15:34
  • Does the member group the authors belong to have permissions to Add/Edit the Freeform module? Commented Oct 13, 2014 at 16:17
  • It's nothing to do with Freeform. It's Channel Form, previously known as Safecracker, and is a means to allow creation of entries from a front-end template. But yes, the author in question (a site admin) has full privileges for this channel and can manage things from the back-end without a problem.
    – foamcow
    Commented Oct 13, 2014 at 16:33
  • I meant Channel. Sorry. Getting some code confused in my head. Commented Oct 13, 2014 at 17:11
  • The only thing I can think of is the Channel does not have the any custom status group assigned. I know that if you're logged in as super admin in the backend, you can still publish entries without a status group. But if any other member group tries to publish an entry (front end or back end), the only status they will be allowed to create is Closed. Commented Oct 14, 2014 at 14:59
0

i've this hardcoded checkbox tag working, didn't did anything special, try this..

<label for="open"><input name="status" type="radio" value="open" id="open" {if "{status}" == 'open'}Checked{/if}> <strong>Public</strong> </label>
<label for="draft"><input name="status" type="radio" value="draft" id="draft" {if "{status}" == 'draft'}Checked{/if}> <strong>Private</strong> </label>

Cheers.

0

i assume from your hard coded example you've set up the Status group with those entries? status is validated against the status group...

As Marc Miller illudes to, have you linked your custom status group to the channel you are posting in (Admin -> Channel Administration -> Channels -> Edit Group Assignments (on the desired channel))?

Lastly, using your hard coded example, haveyou double checked the casing on your statuses? They are case sensative! Worse still when you edit statuses in the CP Open and Closed are displayed proper case, however the value you need to submit in lowercase (notice this in lincolnpixel's example above?).

If you create a new status the value submitted should match the case you typed in on custom statuses editing screen, if its the default Open and Closed, these values must be lowercase. for the ultimate check look at your exp_statuses table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.