Hello.
Please, help with some questions how to do without block editors only in shortcodes.
1. How can I send value to form?
Example (screen #1):
I am on the Exhibit (Gym) page, and on this page I have form add New Note.
Form:
- Exhibit (select) - list of all Exhibit but I need to select by default current Exhibit. How can I do it?
- Text
2. How can I create one click button to delete/edit the Note. screen #2
3. Selectbox - search field is shown but not work - screen #3
Hello and thank you for contacting Toolset support.
I am not really sure to fully understand your question, I might need more details about what you want to achieve, especially, why would you like to pass the related post ID using a shortcode instead of relying on the default Toolset features?
In the meantime, I'll add the following:
- You can pass a related post to the relationship field, inside the form, using the value argument.
...value=[wpv-post-id] ...
Regarding the delete link, that's not possible at all. The only available way is through the delete link that Toolset generates.
If you can provide more details about what you want to achieve, maybe we can find a way to do it.
Good morning, Jamal.
3. Please, see one more screenshot #1. I can not use search field in select2. But in original select2 it works. (screen #2)
1. I have a favorite list of Items. I need to add note to some of it. The 1 form to add Note and many btn to add Note to selected Item. (screenshot #3, 4)
How can I filter Items and show only from favorite list in this selectbox?
How can I set default value from selected item to one form -- from php and from JS .
I am sorry, but I am getting confused a little bit. What Select2 does not work? Is it generated by Toolset or built with custom code?
Maybe, logging in to your website and checking this closely could help me understand better. If you would agree, your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
How can I filter Items and show only from favorite list in this selectbox?
This can't be done out of the box or using a Toolset option. It will need custom code. Check these two replies for examples:
- https://toolset.com/forums/topic/filter-post-relationship-dropdown-by-taxonomy/#post-1220408
- https://toolset.com/forums/topic/how-to-show-in-cred-parent-selector-only-posts-of-logged-in-user/page/2/#post-605405
Please note that these codes will not work for you(because you are seeking favorite posts). They are just examples to explain how it could be done.
How can I set default value from selected item to one form -- from php and from JS
Passing the value of the parent post can be done with the shortcode [wpv-post-id] inside the default field value in your screenshot 3_selectbox_default_and_filter.png
Otherwise, you can generate it inside a hidden element, then use Javascript to pull it and set it on select2. Remember to trigger the change event on select2 after setting the value.
Hello and my apologies for the late reply, but I do not work on Wednesdays and Thursdays as you may check on my profile page https://toolset.com/forums/users/jamal-b/
I couldn't log in into the website because of basic auth hidden link
Please add them in your next reply. Please make sure that WordPress access works.
Once I logged into the website, I'll be able to answer your questions.