Results 1 to 5 of 5

Thread: Autofill a custom field based on the answer a user selects in previous field

  1. #1
    Thread Starter
    cbcrook's Avatar
    Join Date
    Dec 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Autofill a custom field based on the answer a user selects in previous field

    Hi,

    I would like to autofill a custom field based on the answer a user selects in previous field.

    For example, if the user selects "Business A" from a drop down list in "custom field 1", I would like "custom field 2" (in this case its business A's address) to have the correct answer automatically selected/filled out for them.

    I also don't want to let the user change this field.

    I am working on learning php right now, but I do know a bit of logic from other programming languages so I am also including some pseudo code of what I think I need. (Granted I don't even know what file I would modify to do this)

    ------
    IF ( get_post_meta($post->ID, 'custom_field_1', true) = "Business A" )

    { custom field 2 = "Business A's Address" }

    Else IF ( ect)

  2. #2
    Thread Starter
    cbcrook's Avatar
    Join Date
    Dec 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  3. #3
    Thread Starter
    cbcrook's Avatar
    Join Date
    Dec 2012
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    Expired Customer hamdir's Avatar
    Join Date
    Jun 2016
    Posts
    36
    Thanks
    11
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #5
    dimitris's Avatar
    Join Date
    Oct 2011
    Location
    Earth
    Posts
    20,617
    Thanks
    222
    Thanked 1,873 Times in 1,770 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: October 24th, 2012, 01:58 PM
  2. Send Notification Email based on custom field date?
    By jeanne38654 in forum ClassiPress General Discussion
    Replies: 0
    Last Post: March 5th, 2012, 03:55 PM
  3. Filter based on sticky + custom field = "word"
    By einstein in forum ClassiPress General Discussion
    Replies: 0
    Last Post: November 20th, 2011, 05:19 AM
  4. Add custom field to user registration form
    By visionecreativa in forum ClassiPress General Discussion
    Replies: 2
    Last Post: October 13th, 2011, 10:51 AM
  5. [MOD NEEDED] How to insert a user-selected custom field value as a tag
    By escobarcampos in forum ClassiPress General Discussion
    Replies: 1
    Last Post: November 10th, 2010, 07:42 AM