How to add or double field?

by jowan   Last Updated April 15, 2019 09:08 AM - source

I want to add one more field like this, I copied and paste this code. It's gave me one more field, but when I edit first field and publish my post, second field is gating same inserted. enter image description here

<div class="Blkcn TrailerBx"> 
        <span class="Title"><?php _e('Trailer', TRMOVIES); ?><i class="dashicons dashicons-format-video"></i></span> 
        <textarea class="txtara" name="trailer" placeholder="<?php _e('Insert code iframe here', TRMOVIES); ?>">
            if( isset( $_POST['trailer'] ) and empty($ok) ) { 
                echo stripslashes( $_POST['trailer'] ); 
            elseif( get_post_meta($post->ID, TR_MOVIES_FIELD_TRAILER, true)!='' ) {
                echo stripslashes( get_post_meta($post->ID, TR_MOVIES_FIELD_TRAILER, true) ); 
            } ?>
Tags : forms

Related Questions

Using Gravity Forms field as URL parameter

Updated March 13, 2017 16:08 PM