Home › Forums › Plugins Support › Vidi – Video WordPress plugin › How to customize Submit Form in Vidi – Video WordPress plugin
Tagged: submit
- This topic has 2 replies, 1 voice, and was last updated 1 year, 6 months ago by
admin.
-
AuthorPosts
-
July 1, 2021 at 11:17 am #8937
Hi all customer,
In this tutorial we’ll help you customize Submit Form in our plugin Vidi for CPT (included Video, Channel, Playlist, Series)!
You need to have PHP skill to customize as this tutorial.
Please notice depend on fields at Backend, you can add or show fields at Frontend Submit Form.
Here is topic to add new Fields at Backend for CPT. (Update later)
In this tutorial we’ll use Submit Video Form as example.
For easy to manage files you can use WP File Manager plugin: https://wordpress.org/plugins/wp-file-manager/
Step 1: Check all fields have at Backend by open file: wp-content/plugins/haru-vidi/includes/libararies/vidi-metabox-cpt.php
You need to find: $video_attached_meta (line 421) and $video_meta (line 511) to see.
Step 2: Customize Submit Form by open file: wp-content/plugins/haru-vidi/includes/libraries/video-metabox-submit-video.php
Step 3: If the field on Submit Form is not same Backend field name you need to process it:
Example: haru_video_submit_title need process to set title for new video
Step 4: If the field on Submit Form is same Backend field name you don’t need to process it:
Example: haru_video_sever, haru_video_id, …
If you have issue when customize please leave comment below.
Hope this helps and thanks for reading.
******
Best regards,HaruTheme
November 1, 2021 at 4:23 am #9225Example remove check submit content empty you can find the code like this and remove:
if ( empty( $_POST['haru_video_submit_content'] ) ) { return $video_submit->prop( 'submission_error', new WP_Error( 'post_data_missing', __( 'New video requires have content.' ) ) ); }
You will find them on line 700 and 786
November 1, 2021 at 4:38 am #9228Example remove Source server on Submit Form and use only Self Host:
Change the code on line 78 from:'options' => array( 'youtube' => esc_html__( 'Youtube','haru-vidi' ), 'vimeo' => esc_html__( 'Vimeo','haru-vidi' ), 'twitch' => esc_html__( 'Twitch','haru-vidi' ), 'dailymotion' => esc_html__( 'Dailymotion','haru-vidi' ), 'facebook' => esc_html__( 'Facebook','haru-vidi' ), 'google' => esc_html__( 'Drive Google','haru-vidi' ), 'selfhost' => esc_html__( 'Self Host','haru-vidi' ), 'embed' => esc_html__( 'Embed','haru-vidi' ), ),
to
'options' => array( 'selfhost' => esc_html__( 'Self Host','haru-vidi' ), ),
Hope this helps!
****
Regards,
HaruTheme -
AuthorPosts
You must be logged in to reply to this topic.