1. Home
  2. WP User Frontend Pro
  3. Developer Docs
  4. Actions
  5. wpuf_add_post_form_top

wpuf_add_post_form_top

Called at top of the form in front-end.

Accepts 2 Parameters.

  • $form_id (integer)
  • $form_settings (array)

Example

 

function wpuf_add_custom_fields( $form_id, $form_settings ) {
    if ( $form_id != 8 ) {
        return;
    }

?>

<li class=”wpuf-el”>
<div class=”wpuf-fields”>
<input type=”hidden” name=”my_custom_field_1″ value=”Value 1″ />
</div>
</li>
<li class=”wpuf-el”>
<div class=”wpuf-fields”>
<input type=”hidden” name=”my_custom_field_2″ value=”Value 2″ />
</div>
</li>

<?php
}

add_action( ‘wpuf_add_post_form_top’, ‘wpuf_add_custom_fields’, 10, 2 );</pre>

Was this article helpful to you? Yes 5 No 1

How can we help?