How to remove contact form spinning icon?

8 replies · opened Jan 12, 2017

Jjavck2Jan 12, 2017

Hello,

On submit the spinning icon appears and my my controller program take over , and save the data.

But the problem is , the spinning icon still shows , how to hide it?

I don't want to use sendmail.php but hope to handle it myself, because I want to save the data into database but not just mail.

Jjavck2Jan 15, 2017

Hello,

Anybody there??
I want to use Laravel(PHP Framework) to handle form post but not sendmail.php .

Below is the controller code:


public function store(Request $request)
    {
        $contact = Contact::create($request->all());
        if (isset($contact)) {
            return redirect('class/signUp');
            // return echo { "alert": "success", "message": "Success" };
        }else{
            // return echo "fail";
        }
        return redirect('class/signUp');
    }

Please give me some clue , thanks~

SSemicolon WebSTAFFJan 17, 2017

Hello,

This is Definitely Possible. Please consider using the Inbuilt Redirection Features of the Form. Add the data-redirect="http://your-website.com/page.html" Attribute to the .contact-widget Element and also uncomment the echo in the PHP and output a Response as this will proceed to the next step of the Form.

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Jjavck2Jan 17, 2017

Hello,

Thanks for reply.I had checked what you told but no luck.
You can check my attachment to see my code, please give me some clue to fix it.

I found that the contact info seems not store into the database, and that means my controller method isn't called..

Jjavck2Jan 17, 2017

Hello,

add attachment below..

Jjavck2Jan 17, 2017

Hello,

add another attachment below..

Jjavck2Jan 18, 2017

Hello, the problem isn't solved yet.

SSemicolon WebSTAFFJan 20, 2017

Hello,

The PHP Code you are using is incorrect! Please use either return or echo. Not both together! In this case you will need to use only echo.

This will automatically fix your issue. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

Jjavck2Jan 24, 2017

Hello,

In the end , I found the problem and fix it , thanks for your help.
In my case , I have to use return rather than echo , I don't know why actually.
Below is my message code and it do the magic:

return array('alert' => "success" , 'message' => '聯絡訊息已送出,感謝您' );

Anyway, thanks for your help.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard