Viewing 1 replies (of 1 total)
  • Plugin Contributor fireproofsocks

    (@fireproofsocks)

    With 0.9.7.1 (see the dev branch), you can create entire forms on the front-end: https://code.google.com/p/wordpress-custom-content-type-manager/issues/detail?id=132
    https://code.google.com/p/wordpress-custom-content-type-manager/wiki/cctm_post_form

    If you want to create just a single dropdown, that would take some custom development — I’d recommend that you review the source code to see how it draws its forms. In particular the includes/StandardizedCustomFields.php class and also the CCTM.php’s cctm_post_form function.

    E.g. study this:

    $FieldObj = CCTM::load_object('text','fields');
    $post_title_def = array(
    	'label' => 'My Field',
    	'name' => 'my_field',
    	'default_value' => ''
    	'extra' => '',
    	'class' => '',
    	'description' => '',
    	'validator' => '',
    	'output_filter' => '',
    	'type' => 'text'
    );
    $FieldObj->set_props($def);
    
    print $FieldObj->get_create_field_instance();

    Each type of field has its own properties you’d have to set and pass as arguments to the set_props() function — see the Dropdown PHP class inside of the fields folder.

Viewing 1 replies (of 1 total)
  • The topic ‘Show Dropdown made in CCTM in frontend’ is closed to new replies.