# Multiple Render Function Widgets

Widgets are required to provide one function called `renderIt()`, but they can actually provide more than one render option. If you add another function, then the display of the Widget Form changes.

Now you will see a `Public Methods` menu, with a list of public functions in ths CFC. Below you can see the required function `renderIt()` and the 2 additional functions. `listOfPages()` and `listOfCategories()`

![](https://2786315782-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LA-UVvYQ9YKIVXFz01w%2F-LA-UcIjNIclM_mn00Gl%2F-LA-UrDbEmUDzSTMK-wC%2Fcb_widget_multiple_render.jpg?generation=1523648002979805\&alt=media)

When you select a different Method, the options change, depending on the function. This means you could have 1 widget, with several different display options... each with their own set of arguments. Packaging them inside a single Widget CFC allows them to easily share functions.

Above, you can see the `renderIt()` function has 1 argument, with label, hint, required etc.

The `listOfPages()` function has 1 argument, a plain text field `numberOfPages`, as you can see below.&#x20;

![](https://2786315782-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LA-UVvYQ9YKIVXFz01w%2F-LA-UcIjNIclM_mn00Gl%2F-LA-UrDrCcCwwo7n_Ys7%2Fcb_widget_multiple_render2.jpg?generation=1523648002932499\&alt=media)

The `listOfCategories()`function has 1 argument, a plain text field `numberOfCategories`, as you can see below.&#x20;

![](https://2786315782-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LA-UVvYQ9YKIVXFz01w%2F-LA-UcIjNIclM_mn00Gl%2F-LA-UrE87wYk0XCyG-5L%2Fcb_widget_multiple_render3.jpg?generation=1523648003013305\&alt=media)

## Hiding UDF Functions

If you add a UDF to your Widget, to be able to dynamically create the select drop down for your Widget arguments, you might notice an unexpected side effect. This function / method shows up in the `Select a Method` drop down box.

![](https://2786315782-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LA-UVvYQ9YKIVXFz01w%2F-LA-UcIjNIclM_mn00Gl%2F-LA-Up4afO-OnINsjVOV%2Fcb_widget_argument_optionsUDF.jpg?generation=1523648000855804\&alt=media)

Your first thought might be, to use a private function. The Widget form builder needs to call the UDF to generate the Select Boxes, so it cannot be a private function.

The solution, add Meta data about the function... including `cbignore`. You can add this with the function meta data in a comment.

```java
/**
* @cbignore
*/
function getTargetTypes(){
    return [ '_self','_blank','_top','_parent','ThisisfromTheUDF' ];
}
```

Or you could add this meta data with the inline meta style.

```java
function getTargetTypes() cbignore{
    return [ '_self','_blank','_top','_parent','ThisisfromTheUDF' ];
}
```

With either of these two options, you will see the list of Options provided by the UDF, but you will not see the `Public Methods` option, as there is only 1 public rendering function.

![](https://2786315782-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LA-UVvYQ9YKIVXFz01w%2F-LA-UcIjNIclM_mn00Gl%2F-LA-Up8BGysGaBDUNHvF%2Fcb_widget_argument_optionsUDF_fixed.jpg?generation=1523648000310205\&alt=media)
