Support

Account

Home Forums Front-end Issues Change value when regsitering field via php based upon taxonomy selected Reply To: Change value when regsitering field via php based upon taxonomy selected

  • Hi Greenhoe,

    I don’t think you can easily update the taxonomy parameter of your field once the edit screen has been rendered. It would require an AJAX call and recreating the entire field dynamically..

    May I suggest a different solution that’s maybe a bit easier and doable.
    If you use a relationship field instead there’s a built in filter capability for taxonomies. You can set the field to only allow for 1 value so that it’ll work pretty much the same as the post_object field.

    Then if you really want you should be able to create some custom Javascript for the extra functionality. Look for a change in the taxonomy dropdown and change the taxonomy filter dropdown in the relationship field accordingly. It should trigger the filtering automatically. If you also want to make sure the client can’t change the filter themselves you could just add a tiny CSS snippet to hide the taxonomy filter from them.

    What do you think?