Support » Plugin: Custom Content Type Manager » Show Dropdown made in CCTM in frontend

  • Resolved Karun

    (@karunshakya45)


    Hi,

    I’ve been using CCTM for sometime now and this is a great plugin which has various facilities for making custom fields easy to make and use.

    I just have one question. Is it possible to bring the dropdown select box made inside the CCTM to be displayed in the frontend?

    How to show the the dropdown list in the frontend?

    Thanks 🙂

    http://wordpress.org/extend/plugins/custom-content-type-manager/

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.