I want to create a 'upload image' and 'add video code' buttons to add the multiple photos and videos as a gallery in front-end post forms. The user should also be able to edit these galleries. Can you please suggest me anything about it.
Hello, it depends on what type of gallery you want to create. It sounds like you want to display both images and videos in a gallery. WordPress has a built-in gallery feature, but it does not support videos by default. So I assume you want to use a different type of gallery. Toolset's built-in image slider and gallery blocks work with custom image fields but not videos, and they are designed to pull content from a single custom field with repeating values, not multiple custom fields. Since you want to support both images and videos, you would need some type of 3rd-party gallery tool that supports both image fields and video fields, and allows you to combine more than one custom field to create a dynamic gallery.
I'm not aware of any direct integrations between Toolset and any 3rd-party galleries that support both video and images, so I don't have a great recommendation for you. I can show you how to access Types custom fields using shortcodes or the PHP API if you find a gallery plugin or library you would like to implement, and I can show you how to manage custom fields using Forms.
To access Types custom fields using shortcodes or the PHP API, you can refer to our documentation here: https://toolset.com/documentation/customizing-sites-using-php/functions/
There are examples for using shortcodes or the API for each custom field type.
I can also show you how to access custom field values directly with PHP using get_post_meta if you'd like more information about that.
Let me know if you need any information from Toolset to facilitate implementation with a 3rd-party gallery plugin and I'll do my best to provide any information you need.