• andrewbird

    (@andrewbird)


    I have a challenge. I am using a form input and submit button towards the top of a custom post type edit page, for the user to input some info which I then pass to a php function (on the same page, so action = “”). After this action, the function sets some php variables.

    The wordpress issue is that I want to populate the remaining fields, some custom meta fields, and some custom taxonomy fields with the results of this function. I don’t want to submit straight to the database, I want the user to have the option of manually changing the fields. So my plan was to use a filter hook for the custom meta and taxonomy fields – trouble is I can’t find any hooks which are specific to each form element (obviously i suppose), and which are specific to my particular custom fields text inputs. Any ideas how this is done via this method or any other.?

    Many thanks, Andrew.

Viewing 1 replies (of 1 total)
  • Thread Starter andrewbird

    (@andrewbird)

    So perhaps this will help.

    <form action="" method="post"/>
       <input type="text" name="nameDOI" id="idDOI" />
       <input type="text" name="nameDOI2" id="idDOI" value="<?php echo $_POST['nameDOI']; ?>" />
       <input type="submit" name="requestDOI" value="submit"/>
    	</form>

    This shows the problem in a simple form. So instead of ‘$_POST[‘nameDOI’]’ i’d be using ‘$function_output’. But I need that to go into WPs form fields which are there for the entry of custom meta info?

    Any ideas?

Viewing 1 replies (of 1 total)
  • The topic ‘Filter form elements in Post Edit page.’ is closed to new replies.