PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Populate a field dynmically from another field

  1. flameboyuk
    Member

    Hi there. I'm new to this so please have patience ;-)
    Basically, I would like for a post field (which is only visible to the admin) to be dynamically populated from another standard or advanced field so that the data can be used for a post. One example of this is if the post title is automatically populated with the users name. Is this possible?

    Much appreciated for any help you could give me on this.

    Posted 12 years ago on Monday April 26, 2010 | Permalink
  2. flameboyuk
    Member

    Does anyone have any ideas on this?

    Posted 12 years ago on Thursday June 3, 2010 | Permalink
  3. This is possible, but it takes knowledge of PHP to do so using available API hooks to do so. If you aren't comfortable with PHP and using WordPress API hooks you may want to consider hiring someone to do the customization for you. There are a few people on these forums that do custom work like this.

    Posted 12 years ago on Thursday June 3, 2010 | Permalink
  4. flameboyuk
    Member

    Thanks Carl, I understand. Another alternative for me is to use functions to grab a value from a specific field in the database to place in a post in order to achieve what I want. Is that at all possible and if so, is there any code that you know of to achieve this?

    Posted 12 years ago on Friday June 4, 2010 | Permalink
  5. Yes, it's possible to use hooks to pre-populate form fields, including the post fields in the form. If you do a search on the forums for the following search terms you will find plenty of posts with code snippets, etc. to get you started.

    pre-populate field
    pre-populate data
    prepopulate field
    dynamically populate

    Posted 12 years ago on Friday June 4, 2010 | Permalink
  6. flameboyuk
    Member

    Thanks for the help, Carl, I'll take a look and see what I can do.

    Posted 12 years ago on Tuesday June 8, 2010 | Permalink