Need Help Modifying Value of a Date Field Using JS/jQuery
-
Hello heroes of WPMU!
I am using a forminator with custom jQuery code so the form will show the latest submitted data by the user. here is the code I use:
jQuery(".couple-dashboard .wedding-date input").attr("placeholder",jQuery('.dbuff-date').text()); jQuery(".couple-dashboard .wedding-date input").val(jQuery('.dbuff-date').text()); jQuery(".couple-dashboard .wedding-venue textarea").val(jQuery('.dbuff-venue').text());
the dbuff-date and dbuff-venue is where i put a previously submitted data (thanks to Adam from previous ticket https://www.ads-software.com/support/topic/showing-a-single-field-of-the-latest-entry-using-a-shortcode/)
Now, the problem appears when I submitted the data, and refreshed the page. It’s supposed to show like this (the red square): https://prnt.sc/ByAXbXiD5mCt
but somehow it appears like this (the red square): https://prnt.sc/uJOXnU8W_uaK
the textarea field works fine but somehow the date field is all broken. <span style=”text-decoration: underline;”>I tried to change the value using jquery, somehow the textfield works but not the date field</span>. Here’s from the Chrome’s inspect element (https://drive.google.com/file/d/1-1LcGv41lybAVSSa8AWR-aadH-oKGyf9/view?usp=sharing)
Any idea to fix this? Thanks so much!
- The topic ‘Need Help Modifying Value of a Date Field Using JS/jQuery’ is closed to new replies.