Problem with Drop-down list (single select)

  • Krx
  • Auteur du sujet
  • Visiteur
  • Visiteur
il y a 6 ans 1 mois #4962 par Krx
Hello

I have a problem. I have two Drop-down list (single select) fields.
Check Screenshot_1 attached image for settings of one of those fields.
These are the values:

0::Select
1::Berkshire
2::Cape Cod and the Islands
3::Minuteman
4::Pilgrim
5::Pioneer Valley
6::Sturbridge

Now please visit this URL: www.campmass.com/directories.html

1st problem:
First and second drop down select field should display their names by default: "Regional" and "Attraction type"
But they show "Select" by default
- ALL items have this field changed into something other than first select item "Select" in item manager
- How to fix this?

2nd problem:
which is related to first problem:
2nd drop down list "Attraction type" is also showing "Select" as default when viewing map.
Not all of the items have this field changed into something other than first "Select" line in item manager.
- How to fix this?

IMHO if nothing is set in backend item manager for these two fields, so that first item "Select" with value 0 is set,
frontend shouldn't display "Select" within other items in drop down. It should only show first line as name, and other items respectively , if value for that item is greater than 0, like in Screenshot_2 attached image

Please suggest solution.

Gmap pro J3.119P Août 2018
Joomla 3.8.13

Thanks,
Regards
Pièces jointes :

Connexion ou Créer un compte pour participer à la conversation.

  • Krx
  • Auteur du sujet
  • Visiteur
  • Visiteur
il y a 6 ans 4 semaines #4964 par Krx
Réponse de Krx sur le sujet Problem with Drop-down list (single select)
Hello

No support for this?

Connexion ou Créer un compte pour participer à la conversation.

  • Krx
  • Auteur du sujet
  • Visiteur
  • Visiteur
il y a 6 ans 4 semaines #4965 par Krx
Réponse de Krx sur le sujet Problem with Drop-down list (single select)
Hi

I couldn't wait for (slow) support any more so I've found a solution by myself:

in com_gmapfp/models/gmapfp.php file, approx line 372,
I changed this line:
$cn++;
$valeurs[iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', substr(strstr($param, '::', 0),2))] = JHTML::_('select.option', strstr($param, '::', 1), substr(strstr($param, '::', 0),2) );

into this:
if(strstr($param, '::', 1) > 0){
$cn++;
$valeurs[iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', substr(strstr($param, '::', 0),2))] = JHTML::_('select.option', strstr($param, '::', 1), substr(strstr($param, '::', 0),2) );
}

So drop down list filter doesn't show items with value 0

HTH someone,
Regards

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 6 ans 4 semaines #4966 par gmapfp
Hi Krx,

Sorry for the time, but I had forget this post.

For the Pro version send me a email adn if I'm not reply in two days, resend me an alert.
Normally, I answer in 1 day.

There are realy a bug.
But the problem is in file /administrator/coponents/com_gmapfp/models/helpers/champs.php

You don't need to write :
0::Select
This value must be add automatically for the single select drop-down list.

I will publish the update.

Connexion ou Créer un compte pour participer à la conversation.

Temps de génération de la page : 0.069 secondes
Propulsé par Kunena
FaLang translation system by Faboba