Disable button after redirect

Asked

Viewed 27 times

1

I have the following situation: A screen (Tela1) where the user chooses the button referring to a Set (an entity of my program), he clicks and opens a registration form for that Set.

By clicking register, the form data is saved in the database and the user is redirected to Tela1 again to be able to register next.

Would anyone know how I could generate this Tela1 with the button related to the previously disabled filled Set? Thank you very much.

1 answer

1

Good afternoon, I believe that for this case, Voce should store the result of database operation, something like this:

if($var->save()){
$auxiliar = true;
}

Before sending to the next form, Windows redirects returning the auxiliary variable, if it is like TRUE, Windows only need to disable the button with some language (Node, Javascript and etc), checking its state (True or false).

ex:

return redirect()->with($auxiliar);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.