Support

Account

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

  • 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]