Hello there!
I have a feature request that I think would be really useful in certain scenarios. I might take a crack at making a pull request if you guys think it’s doable for a noob, but here it is:
The custom field entry feature is very handy in a lot of situations, however sometimes websites don’t implement HTML that contains the applicable selectors used by bitwarden. In this example, the website provides users with 25 different three letter codes that act as a MFA tool, and are required on each login. The 25 entries are assigned an ID ranging from A1-A5, B1-B5,… to E1-E5.
Using the current custom field entries, the only tags that can be targeted are the “otp1”, “otp2”, and “otp3” name attributes on the input fields. Here is an example from the login section:
<div class="otp-input">
[E4]
<input type="text" name="otp1" size="8" maxlength="3" value="" id="otp1" class="form-control" autocomplete="off">
</div>
It would be incredibly helpful in these scenarios if the custom fields also had an optional, conditional selector tool that would let me choose for example the “[E4]” text and assign that to what should be filled in to the “otp1” input. That way, depending on the text that is assigned to each field, Bitwarden would be able to assign the proper entry.
IE: E4 gets assigned to “otp1” because “E4” is the text within the class “otp-field”, which is a sibling of the “otp1” named input field.
Maybe another option could be added to the custom field called “map”, which would be able to contain multiple key:value elements, and have the ability to select the innerHTML of the parent, sibling, or child of the custom field entry in addition to the current attribute selectors. This would be more geared towards power-users and might be confusing for some, so I can see how something like this might not be approved as a FR.
I hope this makes sense, and my apologies if something like this has been requested before, I couldn’t find any relevant features requests though.
Cheers!