The https://octobercms.com/docs/services/html states that
in Twig all functions prefixed with form_ will bind directly to the Form facade and provide access to the methods using snake_case
However, {{ form_number('name', 'value') }} for Form::number('name', 'value') facade method throws the following error:
An exception has been thrown during the rendering of a template ("Method number does not exist.").
@zigi05 The Form facade is linked to the October\Rain\Html\FormBuilder class, which does not have a number method. You could instead use form_input and use number as the first attribute (ie. {{ form_input('number', 'fieldName', 'fieldValue') }})
Most helpful comment
@zigi05 The
Formfacade is linked to theOctober\Rain\Html\FormBuilderclass, which does not have a number method. You could instead useform_inputand usenumberas the first attribute (ie.{{ form_input('number', 'fieldName', 'fieldValue') }})