1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Adding Custom Metafields in 3.6

Adding Custom Metafields in 3.6

4 posts, 0 answered
  1. Jason Hedges
    Jason Hedges avatar
    22 posts
    Registered:
    16 Jul 2009
    27 Jul 2009
    Link to this post
    I've tried to following the various resources that are available for adding custom metafields (for example: http://sitefinitywatch.com/blog/09-01-15/Adding_Custom_Fields_to_Existing_Sitefinity_Modules.aspx) but they all seem to reference user controls that are no longer available under Sitefinity 3.6.

    In my case, I'm trying to add a custom field to the Events module. I added my field in the web.config and added it to the EventsItemNew.ascx and EventsItemEdit.ascx files. It shows up but does not save data. I looked in the database and I see the record in the database with the correct KeyValue but no data is saved.

    Is there another step needed now in 3.6 that I'm not seeing in those directions?

    Thanks!
    Jason
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    27 Jul 2009
    Link to this post
    Hi Jason Hedges,

    Please check whether your metakeys are added between opening and closing tag of ContentMetaFields control.

    If the problem persists, please send the settings you made in the web.config and templates.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Jason Hedges
    Jason Hedges avatar
    22 posts
    Registered:
    16 Jul 2009
    27 Jul 2009
    Link to this post
    Ah, looks like that was it! I was trying to add my new field to the top of the form. The first fields on the page weren't in that control - I didn't realize it was further down in the markup. Can that control be duplicated on the page? For example, if I want my custom control to show up at the top of the form, can I just add an additional ContentMetaFields control?

    Thanks,
    Jason
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    27 Jul 2009
    Link to this post
    Hello Jason Hedges,

    By design you can use only one control. In this case you can change the css if this will help. Otherwise you need to implement custom view with several ContentMetaFields controls and persists the metakeys data.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
4 posts, 0 answered