Home Forums Front-end Issues Get Default field value from URL


Get Default field value from URL

  • Hello, i need a help for my frontend form.

    01. How can i get Field Value from my url link ?
    Ex.”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.


    i use javascript to set value

    <script type="text/javascript"> 	
    	$.urlParam = function(name){
    		var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href);
    		return results[1] || 0;
    	$("input[name='acf[%FIELD NAME%]']").val($.urlParam('parent'))

    Change “FIELD NAME” with field name like [field_5e8d66375739f]

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Get Default field value from URL’ is closed to new replies.