Hello, i need a help for my frontend form.
01. How can i get Field Value from my url link ?
Ex. http://www.domain.com/?id=”xxx” > Get Value from a field_name ( not the post title ) base on this ID, and set as default value on field_name into new submission.
02. I need to set multi submit button, but for different “return” redirect link.
Thank you.
SOLVED
i use javascript to set value
<script type="text/javascript">
$(document).ready(function(){
$.urlParam = function(name){
var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
return results[1] || 0;
}
$("input[name='acf[%FIELD NAME%]']").val($.urlParam('parent'))
});
</script>
Change “FIELD NAME” with field name like [field_5e8d66375739f]