Hello,
I'm wondering if it's possible to add prefix to all the values that correspond to my submitted form and not to mix them with parameters from other modules.
My situation is next: for the user profile I'm using "profiler" module and on the very same page I got form from chronoform.
Everything looks OK but the problem appears during the process of submission: after the submission "profiler" module adds explicitly 'id' parameter to $_POST array (this is the way it defines users). Because of this 'id' parameter being added to POST request, chronoforms thinks that this is an id that it need to use for submission and it tries to 'UPDATE' corresponding value with id=1, which actually doesn't exist.
So, instead of having 'INSERT' statement, chronoforms tries to 'UPDATE' inexisting one, because 'profiler' module has cheated and added 'id' param.
My idea was to try to add prefix to all the values that correspond to chronoforms, so it won't mix with other parameters.
Do you have any ideas regarding this?
Kind regards,
Dmytro
I'm wondering if it's possible to add prefix to all the values that correspond to my submitted form and not to mix them with parameters from other modules.
My situation is next: for the user profile I'm using "profiler" module and on the very same page I got form from chronoform.
Everything looks OK but the problem appears during the process of submission: after the submission "profiler" module adds explicitly 'id' parameter to $_POST array (this is the way it defines users). Because of this 'id' parameter being added to POST request, chronoforms thinks that this is an id that it need to use for submission and it tries to 'UPDATE' corresponding value with id=1, which actually doesn't exist.
So, instead of having 'INSERT' statement, chronoforms tries to 'UPDATE' inexisting one, because 'profiler' module has cheated and added 'id' param.
My idea was to try to add prefix to all the values that correspond to chronoforms, so it won't mix with other parameters.
Do you have any ideas regarding this?
Kind regards,
Dmytro
Hi Dmytro,
The simplest solution may be to rename the id column in your ChronoForms table to say cf_id - that should avoid the problem with the ids conflicting.
Bob
The simplest solution may be to rename the id column in your ChronoForms table to say cf_id - that should avoid the problem with the ids conflicting.
Bob
Oh, really? It's as easy?
Great. I will give it a try.
I thought that 'id' is hardcoded somewhere...
Thank you very much, Bob.
Have a nice day.
Great. I will give it a try.
I thought that 'id' is hardcoded somewhere...
Thank you very much, Bob.
Have a nice day.
Hi, Bob,
I've tried your solution but I'm having a problem with cache.
My $this->pkey is being loaded from the cache:
I've tried restarting server and purging cache from Joomla admin panel but this didn't help.
Could you advise how to delete cache, please?
Kind regards,
Dmytro
I've tried your solution but I'm having a problem with cache.
My $this->pkey is being loaded from the cache:
if(Base::getConfig('cache') >= 1 AND Base::getConfig('cache_dbinfo') >= 1){
I've tried restarting server and purging cache from Joomla admin panel but this didn't help.
Could you advise how to delete cache, please?
Kind regards,
Dmytro
Pffff, how could I miss it?
There's button "Clear Cache" directly in the Chronoforms Management menu".
Thank you, Bob, your solution works like a charm😉
Kind regards,
Dmytro
There's button "Clear Cache" directly in the Chronoforms Management menu".
Thank you, Bob, your solution works like a charm😉
Kind regards,
Dmytro
This topic is locked and no more replies can be posted.