Loading...

hidden

< Back To DOCS

Purpose

With <input type="hidden"> you can add or update values in firebase without displaying them to the user. Beware, although this value is not seen on the end users screen, it is not difficult for someone to figure out the hidden value so do not put secure data here. Whenever the value is updated in firebase, the value on your web page will updated too without even hitting refresh. If the tags id does not exist in firebase, firefight will automatically add it to firebase. HTML and firefight require all ids to be unique.

The atr-user optional attribute will set the hidden value to the current users data. For example <input id="currentUser" type="hidden" atr-usr="name"> will set currentUser to the name of the authenticated user. If the user is not logged in, the value will be an empty string. To use atr-user, the ff-login attribute must be present on the page. For a complete list of valid values for atr-user, see ff-login documentation. Please see simple-chat for an example of this feature.

Sample: hidden result

HTML


            

Result

Firebase emulator

  • hiddenResult:

Future Features

Firefight does not currently support nesting input or other elements that write to firebase inside ff-foreach.

Other resources

< Back To DOCS