Skip Navigation

[Resolved] filter options of a “select” field in a post form

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 1 reply, has 1 voice.

Last updated by Minesh 2 weeks, 2 days ago.

Assisted by: Minesh.

Author
Posts
#2791485

I have 3 CPT's: MOVIES, TX_ASSET and AV_ASSET. (slugs are "movie", "tx-asset" and "av-asset").

AV_ASSET is a child of MOVIES.
TX_ASSET can be a child for MOVIES or for AV_ASSET.

TX_ASSET has a custom field "tx-asset-type" which is a select field with various options in order to define a type of text asset (contract, technical document, legal document, subtitles, etc...).

From a movie page I open the "new post" TX_ASSET form from using a "create a child link" so when filling the form it is automatically linked to its MOVIE parent without the need to choose one in a dropdown list.

I do the same when I'm on the AV_ASSET item page so I can create a new TX_ASSET directly linked to the AV_ASSET parent.

What I'd like to do is removing some options of the "tx-asset-type" select field of the "in creation" TX-ASSET when it will be a MOVIE child, and removing some others when it will be a AV_ASSET child.

For a MOVIE child I'd like to display (for exemple) the dropdown list of options:
- Option 1
- Option 2
- Option 5

and for a AV_ASSET child:
- Option 3
- Option 4

How can I achieve that ?

#2791578

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - there is no such feature available to exclude the select field options.

If you can share problem URL of "MOVIE child" and "AV_ASSET child" and tell me what exactly the optoins you would like to exclude and share admin access details. Once I review your structure I will be able to guide you in the right direction.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.