Got a problem with an almost finished form. I need to dynamically put the article ID into my form so that I can link to it. Funny thing is, in the debugger it gives me an article_id field, but it seems that I cannot access it. It won't get put in my form.
My form has multiple actions, including a make article action. This article gets made on values which he gets from the form submitted. This article links to itself, with an readmore link, so I can make a popup with JCE mediabox and show the rest of the article. But I need the article ID of this article so I can insert this ID into the link.
I think the problem is, is that when the Sumbit Article action is called, only then is the ID created, but that action is after my content initialization, so the ID cannot be placed into it, because it isn't there. So is there a way to get the ID of the new created article?
My form has multiple actions, including a make article action. This article gets made on values which he gets from the form submitted. This article links to itself, with an readmore link, so I can make a popup with JCE mediabox and show the rest of the article. But I need the article ID of this article so I can insert this ID into the link.
I think the problem is, is that when the Sumbit Article action is called, only then is the ID created, but that action is after my content initialization, so the ID cannot be placed into it, because it isn't there. So is there a way to get the ID of the new created article?
I've made it work now but with a little bit of workaround. I made it work with jQuery, so its not really the best soluton but is working so its good !
Hi huubs,
You solution is probably OK.
Because you don't know the article Id until it has been created the only fix i can think of would be to add a placeholder when the article is created e.g. ##id## and then use a Custom Code action with a MySQL REPLACE() query to update the article with the new id.
Bob
You solution is probably OK.
Because you don't know the article Id until it has been created the only fix i can think of would be to add a placeholder when the article is created e.g. ##id## and then use a Custom Code action with a MySQL REPLACE() query to update the article with the new id.
Bob
This topic is locked and no more replies can be posted.