Next.js Discord

Discord Forum

not able to revalidate the path

Answered
Boby posted this in #help-forum
Open in Discord
After submitting the form, I am using the server action my data still persists in the form although it is creating a new data entry in my db but input fields are not clearing away.

https://github.com//boby900/yogurt

TIA
Answered by joulev
The form doesn’t automatically clear on submit. You need to clear it manually
View full answer

5 Replies

can anyone please help me with this?
Answer
@joulev The form doesn’t automatically clear on submit. You need to clear it manually
okay, then revalidatePath is working but I will have to add some logic to clear the form inputs after submitting?
thanks for your help🙏