Viewing 1 reply thread
  • Author
    Posts
    • #2802
      ajayphp
      Member

      Hi,

      I wanted to replace post title in custom post type,

      i followed your replacing-wordpress-post-editor/ doc,

      but that does not work, i also name the field = post_title

      How to achieve this ?

      `piklist(‘field’, array(
      ‘type’ => ‘text’
      ,’field’ => ‘post_title’
      ,’label’ => ‘Api Title’
      ,’description’ => “Api Title”
      ,’attributes’ => array(
      ‘class’ => ‘regular-text’
      ,’placeholder’ => ‘Enter Api Title…’
      )

      ,’required’ => true
      ));
      `

      I wanted to save this field in post s table rather as post_meta as meta fields.

    • #2803
      ajayphp
      Member

      Hi,

      I got resolve this, but there is bug
      when saving field with scope = “post”

      then post_title is saved but then post_name which usually lowercaes without space dynamically
      save for url access. (did not saved)

      so how can i resolve this.

      – i tried with the example of update field,
      but here is not mention how to get the filled value of first field to auto update second field

        piklist('field', array(
          'type' => 'select'
          ,'field' => 'master_field'
          ,'label' => 'Master field'
          ,'choices' => array(
            'update_field' => 'Update'
            ,'no_update_field' => 'No update'
          )
          ,'conditions' => array(
            array(
              'type' => 'update'
              ,'value' => 'update_field'
              ,'field' => 'my_field'
              ,'update' => 'Hello World!'
       
            )
          )
        ));
       
        piklist('field', array(
          'type' => 'text'
          ,'field' => 'my_field'
          ,'label' => 'Show/Hide Field'
          ,'description' => 'This field is updated by the Select field above'
        ));
      
      

      How to update the “master_field” update value to another “my_field” value
      or how to get value dynamically of another field.

      ??

Viewing 1 reply thread
  • You must be logged in to reply to this topic.