Hi! We have an article category 'Events'. We would like to create a registration form for these events. Is there a way to get the titles of the articles in the artikel-category 'events' (only published?) in a dropdown / select?
Or is there an other easy way we can let a site manager create a custom list for dropdown items without giving them access to the Choronoforms component? Maybe an article or module where they can put the lsi of items we can use in the dropdown?
Kind regards,
Jip
Or is there an other easy way we can let a site manager create a custom list for dropdown items without giving them access to the Choronoforms component? Maybe an article or module where they can put the lsi of items we can use in the dropdown?
Kind regards,
Jip
Hi Jip,
You can add a DB Read action to query the database . The basic query you need to set the Conditions for will be something like SELECT id. title FROM #__content WHERE `catid` = 999 and `state` = 1
Bob
You can add a DB Read action to query the database . The basic query you need to set the Conditions for will be something like SELECT id. title FROM #__content WHERE `catid` = 999 and `state` = 1
Bob
OK, that's a good suggestion. I will try that.
I also thught of a different appoach: We could place the reservation for on the event page. This way the user does not have to select te event. Because he/she is already on that page.
But then we need to get some data from the page, Because of the setup of this page the actual title of the even is not in the article title, but in a paragrafp tag on the page with a specific class.
Would it be possible to pass a jQuery value to the form data?
So we might use some jQuery like this:
var EvenementTitel = jQuery("div#agendapagina p.agenda_titel").text();
and then pass it to the form? Or is this not possible?
Or can we use jQuery put this value in to a hidden field?
If not, we could use the Article title (and modify it a bit to suit our needs). I know how to get the article title with PHP but I am still struggling with how to pass a PHP variable (in custom code) to the form data... Can you give met a hint?
Jip
I also thught of a different appoach: We could place the reservation for on the event page. This way the user does not have to select te event. Because he/she is already on that page.
But then we need to get some data from the page, Because of the setup of this page the actual title of the even is not in the article title, but in a paragrafp tag on the page with a specific class.
Would it be possible to pass a jQuery value to the form data?
So we might use some jQuery like this:
var EvenementTitel = jQuery("div#agendapagina p.agenda_titel").text();
and then pass it to the form? Or is this not possible?
Or can we use jQuery put this value in to a hidden field?
If not, we could use the Article title (and modify it a bit to suit our needs). I know how to get the article title with PHP but I am still struggling with how to pass a PHP variable (in custom code) to the form data... Can you give met a hint?
Jip
Hi, I got this to work with jQuery:
Not that bad ;-) So this could be one way to go.
Still wondering about the option to pass a PHP (or jQuery) value to the form. I think I might probably need that in the future ;-) And I'm also just curious to learn more about the possibilities of CF.
I thin there might jet be another solution to our 'problem'. I think we can also use the plugin to pass data to the form? So if I let the site manager put something like this in the article, would that work?
And then get the URL variable and use it in the form?
Jip
<script type="text/javascript">
jQuery( document ).ready(function() {
var EvenementTitel = jQuery("div#agendapagina p.agenda_titel").text();
jQuery('input#evenement').val(EvenementTitel );
});
</script>
Not that bad ;-) So this could be one way to go.
Still wondering about the option to pass a PHP (or jQuery) value to the form. I think I might probably need that in the future ;-) And I'm also just curious to learn more about the possibilities of CF.
I thin there might jet be another solution to our 'problem'. I think we can also use the plugin to pass data to the form? So if I let the site manager put something like this in the article, would that work?
{chronoforms6}aanmelden&titel=This is the event tile{/chronoforms6}
And then get the URL variable and use it in the form?
Jip
Hi Jip,
As you see you can get data about the page and save it to a hidden form variable. There is a FAQ on that for earlier versions.
You can add the JavaScript in the form using a Custom JavaScript element in the form Setup tab.
You can use parameters in the plug-in short-code in CFv5 - I can't see if this is supported yet in CFv6.
Bob
As you see you can get data about the page and save it to a hidden form variable. There is a FAQ on that for earlier versions.
You can add the JavaScript in the form using a Custom JavaScript element in the form Setup tab.
You can use parameters in the plug-in short-code in CFv5 - I can't see if this is supported yet in CFv6.
Bob
This topic is locked and no more replies can be posted.