AI Assistant
Notifications
Clear all

[Solved] Adding dynamic values to comments form custom fields

5 Posts
2 Users
0 Reactions
2,001 Views
(@marco-briz)
New Member
Joined: 6 years ago
Posts: 3
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
  [#5848]

Hi there, I'm usign wpDiscuz on a personal project where I added a custom "select" field to the standard comment form. I see I can specify the set of possibile values for this field at design time, while I would like to fill it programmatically (ex. list of values calculated server side). Is this feasible within the plugin?

I'm attaching a screenshot where the current values are static and configured in the custom form configuration section, while I would like to load them from the server when the page is loaded.

Thank you for the possible support.

Schermata 2020 04 29 alle 16.07.00

 

 



   
Quote
Elvina
(@elvina)
Support
Joined: 7 years ago
Posts: 1403
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Hi @marco-briz

I'm really sorry but there is no way to do that. This requires large changes in the plugin core.



   
ReplyQuote
(@marco-briz)
New Member
Joined: 6 years ago
Posts: 3
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Hi @elvina, thank you very much for your feedback.

I was hoping in a sort of hook-based workaround.

I also tried a client-side approach: I configured the select with dummy values in the Form configurator, and then, once the page is rendered, I replace the values with the needed ones using javascript ; unfortunately, once the "new" value is submitted, it is replaced-back with the original dummy value on server side. Do you have any additional suggestion?

Thank you.



   
ReplyQuote
Elvina
(@elvina)
Support
Joined: 7 years ago
Posts: 1403
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

@marco-briz,

I'm really sorry but we can't suggest anything.
First of all, we don't have the hooks for such cases, then even if we've had such a hook, we will have problems with saving the data. So, sorry but there is no way to do that.



   
ReplyQuote
(@marco-briz)
New Member
Joined: 6 years ago
Posts: 3
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
 

Ok @elvina, thank you anyway for your support.



   
ReplyQuote
Share:
Scroll to top