Support

Account

Home Forums General Issues New to ACF – Need an Advise Reply To: New to ACF – Need an Advise

  • I think you’re going to need to use jQuery to run a script after the appropriate field has been selected. JQuery is JavaScript that you can use to manipulate values from the HTML.

    If I understand you, you have two fields: one for the hotel and one for the bedrooms. So, run jQuery after the second field is selected and store the price in a third field. You can do the same thing on the back end or calculate when the post is saved.
    I don’t think you need nine fields.

    You could have one pulldown with the hotel level, another with the number of bedrooms and a third text field that gets updated with the price after saving. That would be a simple IF ELSE script.

    Another option is to create one pulldown displaying and explaining the nine options, and setting the value of the option as the price. So what the person sees as is “Hotel level 1, 1 bedroom”, but the value of the choice is the price associated with that selection. This can be done when the ACF field is created.

    Hope this helps. I’m not entirely sure if I am seeing what you are trying to do though.