Status: Hide ‘open’ and ‘closed’ and default to something else
Posted: 07 December 2010 12:06 AM   [ Ignore ]
Wallflower
Avatar
Rank
Total Posts:  8
Joined  2010-12-02

In my use of SC, all entries will be one of two statuses: “In Process” or “Completed.” We’re using these names since they’re much more applicable to our situation than “open” or “closed.”

I’m aiming to do two things:

1. Make “open” and “closed” not even show up in the drop-down, and
2. All new submissions should default to “In Process”

I know that, in EE, when you create a new Status Group, “open” and “closed” are automatically inserted into it and there seems to be no way to avoid that. Is there something I can do within SC, or should I rely on something external such as JS or CSS?

Even if I were to give in and leave “open” and “closed” in the list, I can’t seem to set “In Process” as the default status when the form loads up. I saw the Default Status option in the SC settings, which didn’t work, and I can’t really use the status=“In Process” parameter because I need users to change it from “In Process” to “Completed” whenever they’re ready.

Any thoughts on these two things?

Profile
 
 
Posted: 07 December 2010 12:15 AM   [ Ignore ]   [ # 1 ]
Absolute Heartthrob!
Avatar
RankRankRankRankRank
Total Posts:  10369
Joined  2008-09-29

Basically, you could hard-code the items like this:

<select name="status"
<
option value="In Process" selected="selected">In Process</option
<
option value="Completed">Completed</option
</
select

I saw the Default Status option in the SC settings, which didnâ??t work,

Didn’t work because it seems to be a bug? Or because it didn’t work for your situation?

 Signature 
Profile
 
 
Posted: 07 December 2010 12:15 AM   [ Ignore ]   [ # 2 ]
Teen Scream
Avatar
RankRankRank
Total Posts:  3541
Joined  2009-05-29

You might could do:

{statuses}
{if status 
!= 'open' && status != 'closed'}
        
<option value="{status}"{selected}>{status}</option>
{/if}
{
/statuses} 

The Default Status option: this isn’t to show a certain status by default in the dropdown, it’s to ignore the submitted status and auto set it to the default value.

Profile
 
 
Posted: 07 December 2010 12:23 AM   [ Ignore ]   [ # 3 ]
Wallflower
Avatar
Rank
Total Posts:  8
Joined  2010-12-02
Chris Newton - 07 December 2010 12:15 AM

Basically, you could hard-code the items like this:

<select name="status"
<
option value="In Process" selected="selected">In Process</option
<
option value="Completed">Completed</option
</
select

Cool idea; I can see how that solves both of my problems. Thanks!

Chris Newton - 07 December 2010 12:15 AM

I saw the Default Status option in the SC settings, which didnâ??t work,

Didn’t work because it seems to be a bug? Or because it didn’t work for your situation?

My situationâ??from Rob’s reply immediately above, it looks like I misunderstood what it was meant to do.

Thanks guys!

Profile