SchmitzIT
Well-known member
While trying to create a custom drop-down field, I ran into some weird issues.
1) The 'Add Additional Choice' button doesn't work for me under either 1.1.0 or 1.1.1. The only way to get additional fields to appear is entering the available field, saving, and then going back.
However, I'm dealing with a list of 232 entries. So instead, I figured I would inject it into the database by means of a query. I anually created a drop-down list, with a single value in it, and then issued an UPDATE statement against the generated field :
Instead of showing the text values, though, when expanding the drop-down field, it shows:
user_field_countryFlag_choice_aaland
etc. I hasten to add that I essentially replicated the format I saw when manually adding a few entries in a test-field prior to generating the serialized content (which I built a quick C# interpretor for).
3) I need the above field for an add-on. However, when attempting to create a custom user field from scratch, by issuing an INSERT into the xf_user_field table, the title and description are missing, and when trying to open the custom field to inspect what came up in the options, the following error is thrown:
[/LIST]
I'm guessing that this hints at there being a second table that requires updating in case an add-on relies on a custom user field. The big question is: Which one?
Thanks in advance
1) The 'Add Additional Choice' button doesn't work for me under either 1.1.0 or 1.1.1. The only way to get additional fields to appear is entering the available field, saving, and then going back.
However, I'm dealing with a list of 232 entries. So instead, I figured I would inject it into the database by means of a query. I anually created a drop-down list, with a single value in it, and then issued an UPDATE statement against the generated field :
Code:
UPDATE xf110.xf_user_field
SET field_choices = 'a:232:{s:6:\"aaland\";s:6:\"Aaland\";s:11:\"afghanistan\";s:11:\"Afghanistan\";s:7:\"albania\"; ... .s:8:\"zimbabwe\";s:8:\"Zimbabwe\";}'
WHERE field_id = 'countryFlag';
Instead of showing the text values, though, when expanding the drop-down field, it shows:
user_field_countryFlag_choice_aaland
etc. I hasten to add that I essentially replicated the format I saw when manually adding a few entries in a test-field prior to generating the serialized content (which I built a quick C# interpretor for).
3) I need the above field for an add-on. However, when attempting to create a custom user field from scratch, by issuing an INSERT into the xf_user_field table, the title and description are missing, and when trying to open the custom field to inspect what came up in the options, the following error is thrown:
Code:
[LIST=1]
[*][I]Invalid argument supplied for foreach()[/I]in C:\Program Files (x86)\Zend\Apache2\htdocs\xf110\library\XenForo\Template\Abstract.php(265) : eval()'d code, line 251:
250: ';
251: foreach ($masterFieldChoices AS $choice => $text)
252: {
I'm guessing that this hints at there being a second table that requires updating in case an add-on relies on a custom user field. The big question is: Which one?
Thanks in advance