You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.
A pattern we've often used in other products is to allow it to be set hierarchically. So for each field, we'd scan up the DOM hierarchy to find the closest element (which could be the field itself, or some parent div, or the parent form, or the top-level <html> element) that has a data-smartpaste-include attribute.
So:
Since the default is "include", you could exclude by putting data-smartpaste-include="false" on the input element itself
Or if you want to change the default to be "exclude", you'd do that by putting data-smartpaste-include="false" on the <form>, and then put data-smartpaste-include="true" on individual fields.
That's almost the same as what you already suggested, except slightly generalizing it so you can put this attribute at any level in the hierarchy.
@SteveSandersonMS would / could your idea allow two smart buttons within the same form, where one button dealt with one set of inputs and the other a different set?
An example might be a single form into which the user can enter details of both a person and their partner. Many of the fields are essentially the same e.g. FirstName, PartnerFirstName. The user probably has the source information in seperate locations so would not be pasting both people's data in one go, so having two buttons "Smart Paste Client and "Smart Paste Partner" might solve the problem.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
First of all: brilliant work!
I have very large forms where I know certain fields are usually ignored and not pasted.
I think a way to ignore certain fields via data attribute (ie:
data-smartpaste-ignore="true"
) could speed up the computing and save some tokens.Even something like ```data-smartpaste-explicit="true"
on the form and then
data-smartpaste-include="true"`` on the fields we want to use could be OK.The text was updated successfully, but these errors were encountered: