We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Channel Form not working at all

Development and Programming

Wessel's avatar
Wessel
32 posts
4 years ago
Wessel's avatar Wessel

Hi all,

Very strange, build this serveral times in EE3 and EE4… just want to update a status for an entry by channel form: But the form just refreshes, and isn’t saving anything…. What am I doing wrong?

{exp:channel:form channel="opdracht" return="/opdracht/bevestigd/ENTRY_ID" entry_id="{last_segment}"}


<input type="text" name="title" id="title" value="{title}" size="50" maxlength="100" >
<input type="text" name="url_title" id="url_title" value="{url_title}" maxlength="75" size="50">
<input type="text" name="entry_date" id="entry_date" value="{entry_date}" maxlength="23" size="25">
       
{status_menu}
 <label for="status">Status</label>
 <select name="status" id="status">
  {select_options}
 </select>
{/status_menu}

<input type="submit" name="submit" class="btn btn-success btn-sm" value="Gereed melden">
 
{/exp:channel:form}
       
Robin Sowell's avatar
Robin Sowell
13,160 posts
4 years ago
Robin Sowell's avatar Robin Sowell

It worked for me in a quick test, running the latest.

Are you sure you were logged in with proper permissions and such?

       
Wessel's avatar
Wessel
32 posts
4 years ago
Wessel's avatar Wessel

Hi Robin,

Yes I am, when logged of you get the log in form. So it is no cookie or session issue. And I’m logged in as admininstrator.

Build this a thousand times… but now it’s not working. It just refreshes. And won’t save….

Can provide you a login if you want?

       
Robin Sowell's avatar
Robin Sowell
13,160 posts
4 years ago
Robin Sowell's avatar Robin Sowell

For login, we’d need to get you on a support plan and shift over there.

But this is likely something simple- it definitely works when I test it.

Any chance you have some redirects interfering with post? If you use the frontend search form, does it work ok? In other words- are you on www. and getting redirected to no www. and losing your post- something like that?

       
Calan's avatar
Calan
104 posts
4 years ago
Calan's avatar Calan

Did you get this working? I’ve got a clean install of EE6 and using a channel form that simply refreshes without creating a new entry. I’ve never had a problem with previous EE versions. Can’t work out why it’s giving me a problem.

       
Wessel's avatar
Wessel
32 posts
4 years ago
Wessel's avatar Wessel

Hi Calan,

I resolved it but only after a update of EE, don’t know for sure. My short term memory abandoned me… Can you share the template. Maybe I can see whats going wrong.

Kind regards.

       
Calan's avatar
Calan
104 posts
4 years ago
Calan's avatar Calan

Thanks so much, appreciate it.

I’ve updated the channel settings to allow guest post to the channel and form status to open so that it doesn’t need to be set in the channel form.

{exp:channel:form channel="lotto" return="/page/lotto-registration/confirmation" secure_action="yes" secure_return="yes" error_handling="inline"}
                        <div class="mb-3">
                            <label for="title" class="form-label">Full name</label>
                            <input type="text" class="form-control" id="title" value="" required>
                            {if error:title}<div class="invalid-feedback">{error:title}</div>{/if}
                        </div>
                        <div class="mb-3">
                            <label for="lotto_email_address" class="form-label">Email address</label>
                            <input type="email" class="form-control" id="lotto_email_address" aria-describedby="emailHelp" required>
                            {if error:lotto_email_address}<div class="invalid-feedback">{error:lotto_email_address}</div>{/if}
                            <div id="emailHelp" class="form-text">We'll never share your email with anyone else.</div>
                        </div>
                        <div class="mb-3">
                            <label for="lotto_mobile_number" class="form-label">Mobile Number</label>
                            <input type="text" class="form-control" id="lotto_mobile_number" value="" required>
                            {if error:lotto_mobile_number}<div class="invalid-feedback">{error:lotto_mobile_number}</div>{/if}
                        </div>                        
                        <div class="mb-3">
                            <label for="lotto_date_of_birth" class="form-label">Date of Birth</label>
                            <input class="form-control" type="date" id="lotto_date_of_birth" value="" required>
                            {if error:lotto_date_of_birth}<div class="invalid-feedback">{error:lotto_date_of_birth}</div>{/if}
                        </div>
                        <div class="mb-3">
                            <label for="lotto_numbers" class="form-label">Lotto Numbers</label>
                            <select id="lotto_numbers" name="lotto_numbers[]" multiple="multiple" class="form-select" aria-label="multiple select example" aria-describedby="numberhelp" required>
                                {options:lotto_numbers}
                                <option value="{option_value}">{option_name}</option>
                                {/options:lotto_numbers}                                
                            </select>
                            <div id="numberhelp" class="form-text">Press 'Ctrl' to select multiple numbers.</div>
                            {if error:lotto_numbers}<div class="invalid-feedback">{error:lotto_numbers}</div>{/if}
                        </div>                                                                                                
                        <div class="mb-3 form-check">
                          <input type="checkbox" name="agree_to_terms[]" value="Yes">
                          <label class="form-check-label gdpr" for="agree_to_terms">I confirm that I have read and agree to the Lotto Rules and Privacy Policy</label>
                          {if error:agree_to_terms}<div class="invalid-feedback">{error:agree_to_terms}</div>{/if}
                        </div>
                        <input type="submit" class="btn btn-primary" value="Submit">
                      {/exp:channel:form}
       
Wessel's avatar
Wessel
32 posts
4 years ago
Wessel's avatar Wessel

Maybe stupid question, but is the page where you are sending from exact as site_url? So with / or just without WWW. and with / or just without HTTPS? Somewhere far away in my memory I get an idea that was the issue at my side.

       
Calan's avatar
Calan
104 posts
4 years ago
Calan's avatar Calan

Hiya. The entire site is running via HTTPS. The URLs are correct, even the form action and paths. I’ve tried removing the secure_action and secure_return parameters but it doesn’t make any difference.

It’s very bizarre. I wonder if others are having any issues with the channel form in the new V6.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.