How to use the SQL custom field - Event Booking

  • chris
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 3 months ago #56042 by chris
Hello -

How does one implement the SQL type custom field in Event Booking. I have it enabled and showing in my event, but I need to know how to wire it up so that it will show the query results in the select box. Where do you place the query? I understand that when using this type of field in Joomla, according to Joomla Core docs you need to use xml. So my question is where do create the xml file or what do I need to do to essentially use this field type in the custom fields. Thanks!

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #56191 by Russell Noble
Replied by Russell Noble on topic How to use the SQL custom field - Event Booking
I'd also like to see some info on these. I've looked through the documentation but can't find reference to them?

Cheers.

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #56203 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to use the SQL custom field - Event Booking
Hi

Please give me more information about the questions. You want to add this custom fields to registration form or use this custom field to allow displaying more information about the event ?

Please let me know so that I can answer the question

Regards,

Tuan

Please Log in or Create an account to join the conversation.

  • chris
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
9 years 3 months ago #56296 by chris
Hi Tuan,

Well I would like to use it possibly in the registration form. However like Russell said it would be nice to see some examples or documentation on how to properly use them in Events Booking. Let me know if you need more explanation. Thanks!

Please Log in or Create an account to join the conversation.

More
9 years 3 months ago #56316 by kbarnes
Hi Tuan,

I would also like to use the SQL field type in Membership Pro. I want a custom field called "Member Type" to be automatically populated with the name of the subscription plan to which a subscriber has subscribed. I assume a SQL query could easily find and populate the custom field.

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago #62955 by cpaschen
Is there any documentation on this yet.
A bit frustrating to see features in the extension, no documentation about it, and no answer with any solution for over 3 months :-(

Would it be possible to just get simple documentation about how to use the:
Add New Custom field : Field Type = sql

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago #62967 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to use the SQL custom field - Event Booking
Sorry, I missed this forum post. In case I forgot, please remind me.

So basically, the SQL field type in Events Booking will allow you to generate a dropdown field type (a select box) on registration form which the options are returned by a SQL command so that users can choose a option from that dropdown when they register for the event.

To setup it, create a new custom field type SQL. Enter the SQL command which return list of options into Values property of the custom field. The SQL command must return to fields, value and text.

Example of a SQL command which will return list of countries:

SELECT name AS value, name AS text FROM #__eb_countries WHERE published = 1 ORDER BY name

Hope the explanation is clear to you. I will try to improve the documentation soon

Tuan
The following user(s) said Thank You: Laura Rey

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago #63117 by cpaschen
Thanks.

BTW ... contact me if you need someone to do documentation for your extensions. I have quite a bit of experience doing that.

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago #63148 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic How to use the SQL custom field - Event Booking
Thanks for your offer. I want to document it myself because no-one understand the extension better than me. Just need to find sometime to work on it. I think I focus too much on the developement at the moment, need to share the time between development and document.

The extension is quite good now and I will spend more time to work on documentation

Tuan

Please Log in or Create an account to join the conversation.

More
8 years 11 months ago #64185 by Laura Rey
Replied by Laura Rey on topic How to use the SQL custom field - Event Booking
The SQL above for countries works fine from the command line, but when I enter it in the default values field, it isn't rendering. Any idea what I missed?


Attachments:

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc