Welcome to the nuBuilder forums!

Please register and login to view forums and other content only available to registered users.

[Added] Object Attributes

Information about updates, news, Code Library
Post Reply
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

[Added] Object Attributes

Unread post by admin »

The Attributes field can be used to add additional html attributes to an object. It is a string containing a single attribute, or multiple attributes separated by commas.
attributes.jpg
attributes.jpg (57.49 KiB) Viewed 325 times
Some Examples:

:arrow: placeholder

The placeholder attribute provides a hint about the expected data.
Placeholders are displayed as dimmed background text when an input field has no value.
It can be used instead of the JS function nuSetPlaceholder();

Code: Select all

placeholder="Enter a number here"
:arrow: spellcheck

The spellcheck attribute specifies whether the element is to have its spelling and grammar checked or not.
Browsers have different behavior in how they deal with spellchecking in combination with the the lang attribute. Generally spelling is based on the browser's language, not the language of the document.

The following can be spellchecked:

- Text values in input objects (not password)
- Text in textarea objects

The spell checker must be activated in the browser settings.

How Do I Enable Spell Check for Google Chrome?
- Go to Settings.
- Scroll all the way down and click on Advanced Settings.
- Under Privacy, find out “Use a web service to help resolve spelling errors”.
- Turn on the feature by tapping on the slider. The slider will turn blue when the spelling checker is turned on.

Code: Select all

spellcheck="true"
:arrow: accesskey

The accesskey attribute specifies a shortcut key to activate/focus an element. The value must be a single character (a letter or a digit).

Code: Select all

accesskey="l"
The Alt-l shortcut places focus on the input field,

:arrow: data-*

The data-* attribute on an input objects attaches additional data to the input element. To create a custom attribute, replace the * with a lowercase string, such as data-id, data-status, or data-location.

Code: Select all

data-price="$4.99"

:arrow: Note: The pattern, min, max attributes are currently not validated. You will need a custom JS script to do so.

:arrow: More information on input attributes:
https://www.dofactory.com/html/input-attributes
admin
Site Admin
Posts: 2781
Joined: Mon Jun 15, 2009 2:23 am
nuBuilder Version: 4.5
Been thanked: 1 time

Re: [Added] Object Attributes

Unread post by admin »

"Add attribute" dialog added:
add_attribute.jpg
add_attribute.jpg (51.76 KiB) Viewed 312 times
Post Reply