• 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!

TOPIC: Populate items of a catid in dropdown

Populate items of a catid in dropdown 16 years 5 months ago #5664

For putting the title of all the content items of catid 34 in a dropdown, I found this code:
//<code>
$items = "|Please Select[c]\\n";
$rez = mysql_query("SELECT catid_34,title FROM jos_content"
Last Edit: 16 years 2 months ago by bogdan.
The administrator has disabled public write access.

Re:Populate items of a catid in dropdown 16 years 5 months ago #5666

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,

Here's a little fix:
//<code>
$items ="|Please Select[c]\\n";
$rez = mysql_query("SELECT id,catid,title FROM jos_content WHERE catid='34'"
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
Last Edit: 16 years 2 months ago by bogdan.
The administrator has disabled public write access.

Re:Populate items of a catid in dropdown 16 years 5 months ago #5668

Woow! It works, also with the title. Thanks a lot.

I got it with one empty (the last) item. Why is that? I removed the break in items.
The administrator has disabled public write access.

Re:Populate items of a catid in dropdown 16 years 5 months ago #5707

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
I'm not really sure why that's happening. If the last item is empty, you can set this field as required and it will force the user to select something else.
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
The administrator has disabled public write access.

Re:Populate items of a catid in dropdown 16 years 5 months ago #5815

  • proexe
  • proexe's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 34
Hi this is working great for me too, I just wanted to ask if there is a way topull in the data from the database but leave out the archived files within the category?

Regards

Stewart
The administrator has disabled public write access.

Re:Populate items of a catid in dropdown 16 years 4 months ago #5844

  • octavian
  • octavian's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 783
  • Thank you received: 110
Hello,
This code should work:
$rez = mysql_query("SELECT id,catid,title FROM jos_content WHERE catid='34' AND state = '1'"
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here
Regards,
RSJoomla! Development Team
Last Edit: 16 years 2 months ago by bogdan.
The administrator has disabled public write access.

Re:Populate items of a catid in dropdown 16 years 3 months ago #6135

OK, would this work for what I want:

I want a user to enter an office location, and have several of the form fields auto-populate items such as office location, manager, etc.

Do I use the script area for this?
The administrator has disabled public write access.

Re:Populate items of a catid in dropdown 16 years 3 months ago #6136

The two characters before the close parenthesis aren't displaying properly for me. Can you tell me what they are?
The administrator has disabled public write access.

Re:Populate items of a catid in dropdown 16 years 3 months ago #6247

I would like to know what those characters should be as well. Also where do I place this \"code\" to work?
The administrator has disabled public write access.
  • 1

Read this first!

We do not monitor these forums. The forum is provided to exchange information and experience with other users ONLY. Forum responses are not guaranteed.

However, please submit a ticket if you have an active subscription and wish to receive support. Our ticketing system is the only way of getting in touch with RSJoomla! and receiving the official RSJoomla! Customer Support.

For more information, the Support Policy is located here.

Thank you!