yfix.net
  • Home
  • Docs
  • Form
  • Slate
    • bootstrap
    • cyborg
    • slate
  • Overview
  • Install
  • Demos
  • Forms
  • active_box
  • array_to_form
  • auto
  • box
  • button
  • button_radio_box
  • captcha
  • check_box
  • container
  • country_box
  • custom_fields
  • date_box
  • daterange
  • datetime_select
  • db_insert_if_ok
  • div_box
  • email
  • events
  • fieldset
  • file
  • form
  • form_begin
  • func
  • google_maps
  • hidden
  • html5_inputs
  • icon_select_box
  • image_select_box
  • info
  • input
  • link
  • method_select_box
  • number
  • order_box
  • password
  • phone_box
  • radio_box
  • row
  • select2_box
  • select_box
  • stars
  • submit
  • tab
  • tbl_link
  • text
  • textarea
  • tinymce
  • tom_select_box
  • tpl_row
  • ui_range
  • upload
  • user_info
  • user_select_box
  • validate
  • Tables
  • HTML widgets
  • htmx
  • Misc

link() form()

A link button in a form row (Cancel, Back, Help), the text from the first argument.

form()->link($name = '', $link = '', $extra = [], $replace = [])

Options

OptionMeaning
$linkURL (or a $replace key holding it).
class, icon, target, title, rewriteLook and target; default CLASS_BTN_MINI.
descLabel of the row; without it the row has no label.

Example

Cancel

Code

return form(['back_link' => '#list'])
    ->text('title')
    ->row_start()
        ->save()
        ->link('Cancel', '#list', ['class' => 'btn btn-default btn-outline-secondary', 'icon' => 'fa fa-times'])
    ->row_end();

See also: form/submit, form/tbl_link, html/a