[nodebb-plugin-ns-custom-fields] NS Custom Fields
-
Here is how you can reach properties:
nodebb-plugin-ns-custom-fields/public/templates/partials/account/custom_fields_flex.tpl at master · NicolasSiver/nodebb-plugin-ns-custom-fields
Adds additional fields to the user's account. Contribute to NicolasSiver/nodebb-plugin-ns-custom-fields development by creating an account on GitHub.
GitHub (github.com)
.customFields
it's an Array data structure. You can access element via index. -
customFields[0]
- but I'm not sure if template.js supports such syntax. -
I will add to TODO List, so in next updates, you will be able to target concrete custom field.
-
Installed, and added a couple of fields. One with Gender, with two options, and one with Club, with 42 options (all 42 SPFL clubs).
Restarted forum too.
Go to any profile to edit (user/username/edit/custom-fields), including my own, and the page doesn't stop loading - the progress bar (nodebb's blue line which sweeps across the top) stops about 3/4 across the page, and the little spinning circle keeps going.
./nodebb log not showing anything unusual.
Using v1.0.2 and 4.0.0 plugin.
-
hm, interesting.
Hard to guess, what do you have in console, when page hangs on 3/4 of progress?
When have you added 42 fields, did you create unique key for every field?
Did you try plugin with v1.0.0? I have developed v4 on NodeBB v1.0.0. -
@Nicolas In console - the only "warns" I had was possible plugin compatibility issues with spam-be-gone, the Google & Twitter SSO plugins, and it skipped style.css of nodebb-plugin-newuser-invitation. Those appear anyway and don't affect the forum at all.
When I go to edit the custom fields in my profile, that's when it hangs, and there's nothing in log.
Each field had a key - "gender" and "club", with the same names but with capital letters at the start, and each option on both had an individual ID - all numerical (1-2, 1-42).
-
Better, if you will use non-numerical keys for options and fields, I mean -
f1-f2
, just prefix values with some letter.
Edit them. Restart Forum and try again. -
Deleted them both (there's no apparent way to edit the ID or label after they've saved). Added new gender field, used f1 - boy, f2 - girl as options, restarted forum, same issue occurring.
-
and the page doesn't stop loading
When you have this issue, is page rendered, i.e. you can interact with custom fields, or you have empty page?
Updated on dev machine NodeBB to the latest (1.0.2), visited my profile (I have many custom fields, some of them are selects), everything looks fine.
-
Nothing at all is being rendered, if you look at this screenshot, I've a footer widget for stats, with nothing between that and the top of the profile.
Whereas on the profile edit page, it renders fine:
It's odd. I'll remove the plugin, and try again and add new fields, restart forum and so on, maybe it's just not installed properly or something.
-
@Danny-McWilliams @Nicolas I have the same problem using select fields. Normal text fields will work. But select fields are not shown on the edit page and the page does not stop loading. Any solution?
-
@globalcow I wish I have the same issue to troubleshoot it.
Do you use Redis or MongoDB? -
If you want custom fields in the main edit section, I recommend to request such feature from the Core team.
Additional menu item for custom fields is a plugin way. There is no setting, which you could change in order to have custom fields in the main edit section. -
@Nicolas said in [nodebb-plugin-ns-custom-fields] NS Custom Fields:
If you want custom fields in the main edit section, I recommend to request such feature from the Core team.
Additional menu item for custom fields is a plugin way. There is no setting, which you could change in order to have custom fields in the main edit section.Ok! But can i change (rename) by hand ? CustomFields menu name to SOMETHING…?
I need DVB-S2 menu name instead of CustomFields