• 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: Rsform value to J! article to different cat_ids

Rsform value to J! article to different cat_ids 4 years 6 months ago #40695

Hi,
I created an RSform form I called 'form'. It has five fields (name, address, age, town and Category. The value of "town" will be either town1, town2 and town3. Category is hidden or unpublished and the defualt value is empty.
I have also created three Joomla categories with id 4, id 5 and id 6)

Via RSform 'mappings', catid is assigned {Category:value}

I tried to write Rsform PHP script to be called to assign Category the value:

if ($_POST == 'town1'){ $_POST = 4; }
if ($_POST == 'town2'){ $_POST = 5; }
if ($_POST == 'town3'){ $_POST = 6; }

It does not work. I need help.

-Obi
The administrator has disabled public write access.

Rsform value to J! article to different cat_ids 4 years 5 months ago #40723

  • iceferret
  • iceferret's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 246
  • Thank you received: 64
Try this
if ($_POST['form']['town'] = 'town1') {
$_POST['form']['category'] = '4';
}
elseif $_POST['form']['town'] = 'town2') {
$_POST['form']['category'] = '6';
}

and so on
If you can keep your head when all about you are losing theirs, then you obviously don't understand the situation!
Last Edit: 4 years 5 months ago by iceferret.
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!