add dates to hidden fields values
-
I am trying to include the date as the hidden value submitted to salesforce. I found the topic pass-query-param-to-field-value at: https://wordpress.org/support/topic/pass-query-param-to-field-value
but i am having a difficult time following along/ making it work for me use.
Could you point me in the right direction? thanks Graham
The filter code i am using from within a custom plugin is:
‘add_filter( ‘salesforce_w2l_field_value’, ‘salesforce_w2l_field_value_querystring_example’, 10, 3 );function salesforce_w2l_field_value_querystring_example( $val, $field, $form ){
$form_id = “3”; // form id to act upon
$field_name = ’00Nj0000008tKm1′; // API Name of the field your want to autofill
$qs_var = date(‘m/d/Y’); // e.g. ?source=fooif( $form == $form_id && $field_name == $field ){
if( isset( $_GET[ $qs_var ] ) ){
return $_GET[ $qs_var ];
}
}return $val;
}’
and i am attempting to apply it to the following input field:
‘<input type=”hidden” id=”sf_00Nj0000008tKm1″ class=”w2linput hidden” name=”00Nj0000008tKm1″ value=”test1″>’
The topic ‘add dates to hidden fields values’ is closed to new replies.