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
Hi, I am using DKAN2 Drupal. I am facing a problem with adding datasets in the dataset form. I have two multiselect autocomplete fields, one is for tags, and the other is for topics (themes). I want to stop the "allowCreate" option for topics. However, when we set "allowCreate" to false in the JSON schema in the dataset.ui file, it's not working as expected. On the other hand, when we remove the "allowCreate" attribute from the schema, it partially works as it doesn't allow adding or selecting any new topics that do not exist in the provided list. But, in this scenario, when we submit any datasets with selected topics, the selected topics are not saved. And when we edit the same datasets again, it shows empty topic fields.
The text was updated successfully, but these errors were encountered:
DaniyalRaza786
changed the title
I want to stop allowcreate for topic (theme)
DKAN2 Drupal Multiselect Autocomplete Issue with Topics in Dataset Form
Aug 1, 2023
@DaniyalRaza786 : I came across this problem too. I have created a module to fix this issue (and another regarding references, see #4298 ): DKAN reference fix
Installing this module and setting the allowCreate value to "false" should make the dataset form work like you expected it.
Your feedback is appreciated.
Background info: the module is changing the tag option of select2 based on the value of allowCreate, while still keeping the autocreate option true (this is needed for DKAN to work correctly, otherwise the inputs get lost as you described).
Hi, I am using DKAN2 Drupal. I am facing a problem with adding datasets in the dataset form. I have two multiselect autocomplete fields, one is for tags, and the other is for topics (themes). I want to stop the "allowCreate" option for topics. However, when we set "allowCreate" to false in the JSON schema in the dataset.ui file, it's not working as expected. On the other hand, when we remove the "allowCreate" attribute from the schema, it partially works as it doesn't allow adding or selecting any new topics that do not exist in the provided list. But, in this scenario, when we submit any datasets with selected topics, the selected topics are not saved. And when we edit the same datasets again, it shows empty topic fields.
The text was updated successfully, but these errors were encountered: