about modal
i clear the value of the input in the modal before i close modal. when i reopen the modal, the input is not the initial state. It seems to get the focus. how can i deal with it to make it look like a new modal?

@simpliw any code snippets ?
@iqbalaqaba
Can you understand that I am describing Well?
Code snippets help us debug the situation for you. While a screenshot is helpful, it is almost impossible to tell you what the problem is
I have a simple javascript form reset on the click of the close button:
<script> function resetForm(formID, msgs) { document.getElementById(formID).reset(); document.getElementById(msgs).innerHTML =''; }</script>
<div class="modal-footer"><a class="modal-action modal-close btn-flat" onclick='resetForm("contact_form", "contact-form-messages");'>Close</a></div>
It does the trick
@iqbalaqaba @acburst
export default { data() { return { temp: { content: '', name: '' } }; }, computed: {}, ready() { $('.modal-trigger').leanModal(); }, attached() {}, methods: { notify: function() { if (this.temp.content.trim() && this.temp.name.trim()) { this.$dispatch('child-msg', this.temp) this.temp.content = ''; this.temp.name = ''; } } }, components: {} };
@jndoy I tried it your way. the label on top is not located inside the input
@simpliw I didn't include the code for the form itself in my example. I just attached a function to the close button of the modal that the form is inside. I have several modal forms on one page, so the function takes the form ID and the ID of it's corresponding error output element as parameters.