Custom Content Type Manager
[resolved] Show Dropdown made in CCTM in frontend (2 posts)

  1. Karun
    Posted 2 years ago #


    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 :)


  2. fireproofsocks
    Plugin Author

    Posted 2 years ago #

    With (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

    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'
    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Custom Content Type Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic