Tell us what you are trying to do?
I want an editable field that can allows you to pick from the subscribers. I found a post listed below with a similar example but as usual, the details of actual implementation are sparse and I cannot get it to work.
1,
I used the code listed in the post in my functions.php file as directed.
But I'm not sure how to create the dropdown that uses the code in functions.php.
2.
in my post fields group, i added a dropdown field. then i added 'fillthecoachin4' into the field slug.
i get an empty dropdown ('not set'). how do i link a dropdown to get the data provided by the functions.php code?
hi.
i want it to be a front end form. we have projects and here is an example project: hidden link
i want to be able to add subscribers to this form. i also want it to be a repeating form.
so this is a film project. and i want to add subscribers to the form that will perform jobs such as director, director of photography, gaffer, etc.
so i want a repeating form that adds a subscriber and his job title.
thanks.
hi. see screenshots.
1.
i added the exact code you provided into the functions.php file.
2.
i created a custom field called "My Select".
3.
i added the field into the form for my projects (my custom post type)
4.
in the backend and frontend, the field is "not set".
I have tried above custom codes in my localhost with a fresh WP installation + the latest version of Toolset plugins, it works fine.
Since it is a custom codes problem, if you need more assistance for it, please provide a test site with the same problem, fill below private message box with website credentials + FTP access, also point out the problem page URL and field group URL, I need a live website to test and debug
Could you possible also make the "My Select" dropdown with subscribers have a link to that subscriber's profile? so on the front end, people will see the subscriber name and be able to click to go their profile page. thank you very much.
2) Test it in frontend and admin side, it works fine, see the results here: hidden link hidden link
For the new question:
on the front end, people will see the subscriber name and be able to click to go their profile page. thank you very much.
I assume you are going to link to the user's archive page, I have modified the content template "Content template for Projects", in the bottom, add a shortcode block, with below codes:
My select: <a href="<em><u>hidden link</u></em> field='user_login' id='[wpv-post-field name="wpcf-my-select"]']/">[wpv-user id="[wpv-post-field name="wpcf-my-select"]"]</a>
That's great thank you!
Can you please explain why it works now and didn't work before?
The functions.php file you provided has not changed and the custom field has not changed. But now when I use the block "fields and text" on my project post (which inserts the shortcode [types field='my-select'][/types], it works now. Whereas it did not work until you went into the site. It used to say "Not Set".
Thanks.
hi. it is showing only the user's first name and its linking to my account, not their account. i tried to play around with "display_name" vs "ID" in the functions.php code but that didn't solve the link issue so i put it back like it was. can you set it to display name and get the link to work? thank you.
Hi. Thanks for working on this. I see now that I need to move this into a repeating field. I left your "My Select" field on the page (fo now) but added "Talent Name Select" select field into the repeating Group "Talent". When you go to the project page for example: hidden link
I added a link called "Add new talent" to the "Add talent" section near the bottom of the page that takes you to a page to view and edit the repeating field group.
I duplicated the functions.php code you provided and changed the case statement to:
case 'Talent Name Select'
--
1.
the select field says "not set" as predicted. i would like to get this working.
2.
also, for some reason, the "My select" code you made has reverted from linking to the person's profile page again, and links to mine instead. we don't need that to work on the "my select" statement since we are moving to a repeating field but i wanted to point out the problem and hoped you can help me understand how to fix that issue so i don't have to contact support when this happens in the future.
thanks.
New threads created by Luo Yang and linked to this one are listed below: