Tell us what you are trying to do?
My site let's customer's build their own virtual Custom Subwoofer (we'll call this CPT-A) using a Post Form (call it CRED1). When they are satisfied with their custom subwoofer build we want them to be able to choose an Authorized Dealer (call this CPT-B) who will receive via email the user's Custom Subwoofer (the information of CPT-A). My first thought was to build a Relationship Form between CPT-A and CPT-B. Unfortunately, the field for selecting the dealer (CPT-B) doesn't show anything but their name. So what I need to use is a "Dealer Locator" (VIEW1).
Ideally this would just stand in for the drop down field. I understand that's not possible so I tried making some JS to pass the value of the clicked post-title to the dropdown, unfortunately (I suspect because of rendering) that mostly didn't work. I could get the value to complete as text, but since it's not a proper "option" when fully rendered there was no value to tie it to.
So, I'm starting from square one. I need advice... How do I best approach this problem?
Is there any documentation that you are following?
I didn't find any. I did a bit of reading on passing URL's as I considered passing the value to a new page, but that doesn't actually solve the issue.
Is there a similar example that we can see?
I can show you a custom built WordPress example that wasn't built with Toolset.
What is the link to your site?
This link will take you to the customizer, and for the moment I have a dealer locator and relationship form that appear when you make your first edit.
hidden link
The site is IP restricted, so I need to be given a valid IP Address to grant access.
My IP is 113.190.215.17
Do you mean, that you need a Select Field on a Toolset form where the user can select a (maybe post type/user) object, related to the location (presumably a toolset address field)?
This will be very difficult to achieve in a select item, I could probably not help through with this as it would likely require custom code.
However, it might be that I misunderstand, can you show me what exactly the user should be able to choose, and what each pick would mean for a post "behind the scenes"?
Reading the picket value shouldn't be too difficult on the other hand, neither populate a second field on the fly, but it depends on how the data is given/how it should be passed on.
I've activated private forms, in case it's better to show it on a testing or live site directly
I'm going to mark this resolved.
To recap, my original plan was to use a relationship to connect the dealer CPT to the custom subwoofer CPT so that the custom subwoofer could be easily emailed to the correct dealer, but I wanted the user to choose the dealer CPT by using our dealer locator VIEW. The problem (I believe) was that the dropdown field for selecting a dealer doesn't render options until it's been clicked, so there was no way (that I could see) to use javascript to inform that field.
What I realized was that for my purposes, the relationship wasn't totally necessary. All I really needed was pass the basic contact information of the selected dealer from the view to the custom subwoofer CPT. So I used a hidden blank email field and a hidden blank name field (single line) in the cred form for the custom sub CPT and passed the values of the selected dealers in the dealer locator VIEW to those blank cred fields using javascript.
I believe having those fields, I could probably go back in php and automatically create a relationship between the two CPTs, but for right now, it's not necessary.
I'm able to have a user click the value in the view and have the relevant information pass from the view to the cred fields, and then email automatically based on that info.
If you have any insight, please let me know, but I'm satisfied.
My issue is resolved now. Thank you!