question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

I miss an option defaultValue which would be inserted by the clean method. I know that collection2 delivers a autoValue but things aren’t always inserted into the database and even then it takes some of the same logic every time I want to implement a default value.

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AndyWilkinUKcommented, Feb 8, 2015

Liking the defaultValue, works well with the select box, automatically selects that option. Though is there anyway I can use that value to pre-fill the input box in autoform?

Apologies - does work something wrong with Meteor hot code reload 😦

0reactions
vincrocommented, Oct 20, 2015

I can see no apparent and obvious way to set default values on array fields. I am using a custom template within which I have afArrayEachItem, but when clicking .autoform-add-item, the entry comes up blank, with no preselected value.

tracking a dependency on the form.field.deps, doesn’t work without using _.delay, as one cannot guarantee items have been added to the dom reactively, and surely using a default element in the field is the best option.

Any direction would be handy. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

value expressions - produce the default value for any type
Use the default value expressions to obtain the default, uninitialized value of a type. The default value expression can be used with generic...
Read more >
SQL DEFAULT Constraint - W3Schools
The DEFAULT constraint is used to set a default value for a column. The default value will be added to all new records,...
Read more >
Default parameters - JavaScript - MDN Web Docs
Default function parameters allow named parameters to be initialized with default values if no value or undefined is passed.
Read more >
Documentation: 15: 5.2. Default Values - PostgreSQL
A column can be assigned a default value. When a new row is created and no values are specified for some of the...
Read more >
Default value Definition - OECD Glossary of Statistical Terms
In computer processing, an option chosen by the computer automatically in the absence of explicit instructions by the human operator.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found