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

  • Resolved Karun



    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 🙂

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


    With (see the dev branch), you can create entire forms on the front-end:

    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.

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