-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auto data session 3 (do not merge) #214
Conversation
b1d93f7
to
85681fb
Compare
|
||
}); | ||
</script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better for this to live in its own file? eg prototype-kit-js.js
or something? scripts.html
doesn't feel right.
917e5a3
to
84dae6c
Compare
Did a test on this, and it is working 👍🏻 |
Vehicle features | ||
</td> | ||
<td> | ||
{{vehicleFeatures}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be good for this to include 'change' links.
Is it worth having a further page in the tutorial that shows how you can use the data to enable pre-checked answers - I'm not sure the capability would be obvious to users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you have more than one checkbox selected, they are output without a space between them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeh its just the default representation of an array. We could add a filter like:
features: a,b,c
features | formatList: a, b and c
97e9a40
to
b511397
Compare
if (env === 'production' && useHttps === 'true'){ | ||
app.use(utils.forceHttps); | ||
} | ||
nj.addGlobal("checked",function(name, value){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This addGlobal
function seems rather spaced out compared to the rest of the stuff in this page - does it need so many linebreaks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed some whitespace
58decbc
to
443b16a
Compare
443b16a
to
82fae5c
Compare
Looking good! This PR (a long time coming) brings a load of benefits. Thanks for all your hard work on it. A few comments:
The last two could potentially be done on a further tutorial page? |
One issue I know of is this doesn't support populating |
@joelanman presumably it would be theoretically possible to support select tags? if so I think it would be ok to launch this pr but raise an issue to extend it to select tags. |
yeh it wouldn't be hard at all, similar to |
closing in favour of #340 |
This version of automatically storing and showing data across pages does not rely on macros, but instead using the
checked
function directly (see examples below). I'm not sure it's as user-friendly as the version with macros, but it may take a while to finalise our approach to macros.Usage
This will make the kit automatically store all data from forms, for use later in your prototype.
For example if you have an input like this:
You can put this on the next page, or any other page:
Population
To populate a text field with the value a user entered is simple:
To set radios or checkboxes use this:
Using the name and value of the input. For example: