How to use the FormlyConfig for custom type with angular 4 - angular-formly

I am using formly form (ngx-formly-form )in angular 4 , i want to create the custom type for toggle functionality like "Yes" or "No" buttons.
Can any one share the example of how to use FormlyConfig in angular 4.
I found some example but which is angular js specific.

well, I think it can be implemented easily if you follow the doc https://formly.dev/guide/custom-formly-field which shows you how to create a custom field type.
if you're looking for a working example see https://stackblitz.com/edit/ngx-formly-custom-template-3yvkcd

Related

How do I find every page where a form is used across a Kentico instance?

I'm have a Kentico site where there are dozens of old forms produced and managed by the Forms module (formerly BizForms). Many of them have various things wrong with them which will break my instance if I try to upgrade it. I need to be able to find everywhere a form is used on the instance so I can see if it's still in use and where to drop in its fixed replacement.
I'm currently on Kentico 8.2 and trying to upgrade all the way to Kentico 11, which is where the breakages occur.
You first need to understand where a form can be added from within the Kentico UI. Second, you'd need to take into account none of this will work for any instances where there is a form name hardcoded in any custom code. This will only reference the Kentico UI updates.
Where can forms reside in the UI?
Inside a page template using a webpart
Inside page content using a widget
If you're doing a search within a template, you need to create a SQL query to run code similar to this:
select *
from CMS_PageTemplate
where (PageTemplateWebParts like '%formcodename%' -- replace "formcodename" with your form code name
and PageTemplateWebParts like '% type="BizForm" %')
If you're doing a search within the page's content, you need to create a SQL query to run code similar to this:
select DocumentContent, *
from CMS_Document
where DocumentContent like '%(name)BizForm|(BizFormName)formcodename|%' -- replace "formcodename" with your form code name
Either if these queries should get you close to what you're looking for keeping in mind there is nothing out of the box.

Django Rest Swagger 2.0: How to pass data to POST api so that I can get it as request.POST['key']

I am trying to integrate django-rest-swagger==2.1.1 to existing project which has function based views.
In order to add missing paramaters to function based views, I am using this solution:
Solution by daimon
I specify required parameters in yaml, which shows the field in swagger UI too. Now inside my view request.POST['key'] gives None. But request.body contains the required parameter. How should I modify the swagger settings so that view becomes able to access data with request.POST['key'].
I have already tried solution but it didnt work for me.
The issue is actually with your parser, you ll have to mention parser classes in your settings.py priority wise, as mentioned by marcgibbon himself here:
Click to see

Formly does not show up in ng-dialog

I use the Mean-Stack SPA start from scotch.io.
For dialogs I use ng-dialog.
For forms I want to use angular-formly.
I call in the MainCtrl ng-dialog.open to own searchdialog.html.
In the searchdialog.html I want replace a form with angular-formly.
A normal form shows up in the dialog, the formly-coded part does not show up, only the submit-button.
The code is here JS BIN link
Why the formly-form does not show up, but normal forms show up?
EDIT: I added my complete testcode here
GithubCode
The problem you're having is that you're not including the angular-formly library (or even angular) on the page. You'll need to do that first. Also, you're not depending on the angular-formly module 'formly' in your module definition.
If you're not already familiar with how to depend on third-party modules in your angular code, I recommend you read the documentation on Angular modules. Then, follow the getting started instructions on the angular-formly docs. Then take a look at the examples from the angular-formly website. You'll notice that they all include the angular-formly library as script tags. If you'll be using normal script tags, you'll want to download those dependencies and add them to your project.
Good luck!

Can I display multiselect list items as onordered list using Razor?

I was wondering if this is possible with razor syntax (I have found that there are other ways that utilize jquery). Please point me in the right direction if you know one. I am working on a MVC 5 project.
Thanks.
Yes, this is possible by creating custom html helper methods. Refer this little example which would be helpful.
Video version of tutorial

Drupal 7 reverse node reference url effect

I love using the Node Reference URL module but in the case of my current project I need something similar and with a slightly different effect.
I have a node type called Event which needs to have exactly 3 webforms referenced to each event I create.
With node_reference_url the configuration means I will setup the node reference fields in the webform node type with my Event type selected as the target.
However, I need to find a way of reversing that. I'm looking for code tips (or a module if it exists) which will allow me to configure the Event type so that I can have links on each event page to create a total of 3 webforms and their NIDs to be saved as references to the parent event page.
I am using entity reference to do such a thing. It allows you to add one or more reference fields to your content types. These references can be to nodes, profiles, etc.
If you would add these to your Event you could probably select the webforms from there.
I know this plugin also integrates with views (under advanced > relations), allowing you access the fields of the referred content. (Incuding the title and link to node options.)
Want to take it a step further?
Have a look at reference dialog. This module allows you to build similar reference fields combined with Add, Edit and Delete buttons. If the content you are referring to is not yet created, you can do so in an overlay.

Resources