Support

Account

Home Forums Backend Issues (wp-admin) New field type – field not displayed

Unread

New field type – field not displayed

  • Hi,

    currently i create my first ACF-Plugin (my own field type).

    My field is already displayed in the ACF-Management, i can choose it – and the settings are saved.

    But when i switch to my PostType all fields are displayed, up to this new field.
    Only the label of my field are displayed, and after that – nothing ist displayed.

    function create_field( $field )
    	{
    		global $post;
    		
    		// defaults?
    		$field = array_merge($this->defaults, $field);
    		
    		$rand = rand();
    		
    		if(empty($field['value'])):
    		?>
    		<input type="text" id="<?php echo $field['key']; ?>" class="<?php echo $field['class']; ?>" name="<?php echo $field['name']; ?>" value="<?php echo $rand; ?>" />
    		<?php
    		endif;
    		
    		if(!empty($field['value'])):
    		?>
    		<input type="text" id="<?php echo $field['key']; ?>" class="<?php echo $field['class']; ?>" name="<?php echo $field['name']; ?>" value="<?php echo $field['value']; ?>" />
    		<?php
    		endif;
    	}

    Maybe someone has a tip for me?

Viewing 1 post (of 1 total)

The topic ‘New field type – field not displayed’ is closed to new replies.