---
name: "form_opts"
section: "3x"
platform: "macos"
package: "ncurses"
version: "79"
release: "macOS 26.5"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/form_opts/3x"
---

# form\_opts(3x)

set and get form options

## NAME

**form\_opts** - set and get form options

## SYNOPSIS

**#include \<form.h\>**\
 int set\_form\_opts(FORM \*form, Field\_Options opts);\
 int form\_opts\_on(FORM \*form, Field\_Options opts);\
 int form\_opts\_off(FORM \*form, Field\_Options opts);\
 Field\_Options form\_opts(const FORM \*form);\

## DESCRIPTION

The function **set\_form\_opts** sets all the given form's option bits (form option bits may be logically-OR'ed together).

The function **form\_opts\_on** turns on the given option bits, and leaves others alone.

The function **form\_opts\_off** turns off the given option bits, and leaves others alone.

The function **form\_opts** returns the form's current option bits.

The following options are defined (all are on by default):

- O\_NL\_OVERLOAD

  Overload the **REQ\_NEW\_LINE** forms driver request so that calling it at the end of a field goes to the next field.

- O\_BS\_OVERLOAD

  Overload the **REQ\_DEL\_PREV** forms driver request so that calling it at the beginning of a field goes to the previous field.

## RETURN VALUE

Except for **form\_opts**, each routine returns one of the following:

- **E\_OK**

  The routine succeeded.

- **E\_SYSTEM\_ERROR**

  System error occurred (see **errno**).

## SEE ALSO

**curses**(3X), **form**(3X).

## NOTES

The header file **\<form.h\>** automatically includes the header file **\<curses.h\>**.

## PORTABILITY

These routines emulate the System V forms library.  They were not supported on Version 7 or BSD versions.

## AUTHORS

Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric S. Raymond.
