• 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: dropdownlist field generated as form[fieldname][]?

dropdownlist field generated as form[fieldname][]? 15 years 2 months ago #6692

  • enmadmin
  • enmadmin's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
Hello

I am evaluating RsForm!Pro.

The fieldname of a dropdownlist is generated as form[fieldName][] instead of form[fieldName].

Is this is intentional, then I am stuck how to extract the correct name value pair of this POST parameter using
$postdata = JRequest::getVar('form');
and then
$postdata["fieldName"]; the returned value is Array instead of the selected value in the dropdownlist.

Many thanks,

EDIT:
could fix this putting this script in "Script called on form display":
$formLayout = str_replace('][]',']',$formLayout);

Still wondering if there is another way to do this.
Last Edit: 15 years 2 months ago by enmadmin. Reason: solved
The administrator has disabled public write access.

Re:dropdownlist field generated as form[fieldname][]? 15 years 2 months ago #6693

  • bogdan
  • bogdan's Avatar
  • OFFLINE
  • RSJoomla! Official Staff
  • Posts: 122
  • Thank you received: 4
Hello ,

The fieldname of an dropdown is generated that way , because you can set the attribute "multiple" for it. You can get the fieldname by using
$postdata = JRequest::getVar('form');
$postdata[fieldname][0];
Please note: my help is not official customer support. To receive your support, submit a ticket by clicking here

RSJoomla! Development Team
The administrator has disabled public write access.

Re:dropdownlist field generated as form[fieldname][]? 15 years 2 months ago #6696

  • enmadmin
  • enmadmin's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
many thanks!
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!