Skip Navigation

[Gelöst] CRED post form drop down of taxonomy – default to Select instead of values

This support ticket is created vor 1 Jahr, 2 Monaten. There's a good chance that you are reading advice that it now obsolete.

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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 4 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Minesh vor 1 Jahr, 2 Monaten.

Assistiert von: Minesh.

Author
Artikel
#2642137
Screenshot 2023-09-08 at 7.49.40 AM.jpg
Screenshot 2023-09-08 at 7.49.51 AM.jpg

I have two CRED post forms using similar fields. For the Create Artist Profile form, the drop down defaults to "- Select -" and works as expected. (You have to be logged in to see this form.
versteckter Link

For the Create Organization Profile form, the drop down defaults to the first value in the taxonomy. I've copied the same field data and am using the same taxonomy (shared by both post types), so I can't understand why it doesn't default to " - Select - " as well.

versteckter Link

#2642163

Minesh
Supporter

Sprachen: Englisch (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please check with your form in edit form for the form where select option works. There must be custom JS added to add select option for your taxonomy, you should add the same to your another form.

If you do not get please send me admin access details and I would be happy to check the issue further.

*** 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.

#2642201

Minesh
Supporter

Sprachen: Englisch (English )

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

Can you please share where on what page on the frontend I can see the following form that is working in action?
=> versteckter Link

#2642203

Working: versteckter Link

Not working: versteckter Link

#2642205

Minesh
Supporter

Sprachen: Englisch (English )

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

Can you please check now: versteckter Link

To your form's JS box I've added the following custom JS code:

jQuery(document).ready(function($) {
    jQuery("select[name='iowa-county[]']").prepend('<option value="">- Select -</option>');
    jQuery("select[name='iowa-county[]']")[0].selectedIndex = 0;
    jQuery("select[name='iowa-county[]']").attr("required","");
});
#2642209

Thank you! It appears to be working now!