> For the complete documentation index, see [llms.txt](https://contentbox.ortusbooks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://contentbox.ortusbooks.com/v4.x/developing/developing-for-contentbox/back-end-development/widgets/multiple-render-function-widgets.md).

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://contentbox.ortusbooks.com/v4.x/developing/developing-for-contentbox/back-end-development/widgets/multiple-render-function-widgets.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
