Jump to content

Manon

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Manon

  1. Would it be possible to not have the clock icon show up on fields that are not editable since their value shouldn't change?
  2. Don't know if it was only my data but when using a checkbox fieldtype, the checkbox was checked even if the value was 0 so needed to go through all pages to uncheck those that shouldn't be checked. However, added the 'FieldtypeOptions' and it worked perfectly by having the correct value selected. Also, as other mentioned, would be nice to have the module support multi-language site. If the French title could be populated at the same time as the English title with also the status checked, it would help enormously. This also goes for the PageActionExportCSV module to be able to export at the same time the English and French title.
  3. Since I couldn't figure out why it couldn't find only those 3 provinces in the option field using the title, I decided to manually look for them and those with dashes with their corresponding id. The others continue using the title. It's not ideal but it works. $province = $_GET['prov']; if($province == 'Colombie-Britannique'){ $choice=2; } else if($province == 'Nouveau-Brunswick'){ $choice=4; } else if($province == 'Terre-Neuve-et-Labrador'){ $choice=5; } else if($province == 'Territoires du Nord-Ouest'){ $choice=6; } else if($province == 'Nouvelle-Écosse'){ $choice=7; } else if($province == 'Île-du-Prince-Édouard'){ $choice=9; } else { $choice = $province; } $entries = $wire->pages->find("template=municipality_page, province=$choice"); Please advise if somebody finds a better solution. Thank you.
  4. just tried with the id for 'Colombie-Britannique' and it worked so how would I get the $choice id instead? $entries = $wire->pages->find("template=municipality_page, province=2");
  5. Yes I can see all data (pages) using the template without a province selected
  6. Yes I have checked that and they are activated.
  7. from what I can see, it is all UTF-8. Just don't understand why 'Nouveau-Brunswick', 'Terre-Neuve-et-Labrador' and 'Île-du-Prince-Édouard' works but not 'Colombie-Britannique', 'Nouvelle-Écosse' and 'Territoires du Nord-Ouest'.
  8. Yes, with the quotes I commented out the code for the pipe substitution and also tried without the % but with no luck. I have the browser debug on and can see the results of request with no apparent error. Just in case, how exactly do I check for UTF-8 format?
  9. Using the quotes didn't fix it, now the other provinces with dashes are not found, 'Nouveau-Brunswick', 'Terre-Neuve-et-Labrador' and 'Île-du-Prince-Édouard'. So not the solution. Note that there is no user input, just an onclick event which triggers the ajax call. function displayProv(prov){ $.ajax({ url: '/ajax/getParticipants.php', type: 'GET', data: {prov}, dataType: 'JSON', success: function(response){ $("a#prov-name").attr("href", response.ProvinceUrl); $("a#prov-name").text(response.ProvinceChoice); $("#municipalities-list").html(response.MunicipalitiesList); } }); } I had already tried adding contentType with UTF-8 but didn't do anything so I remove it. Any other suggestions?
  10. Working with a multi-language site. I have a field 'province' with the list of provinces in Options in English and in French tab. The field is selectable in the 'municipality_page' template as a dropdown box. I have an Ajax call to retrieve the choice of the province to list the municipalities of that province. Everything works well in English, however, I am having an issue with the French, I don't know if it is because the French provinces uses accents and dashes in them. I was able to make it work for 9 out of 12 provinces with the following code. $province = $_GET['prov']; if(strpos($province, "-") !== false){ $choice = str_replace("-", "|", $province); } else { $choice = $province; } $entries = $wire->pages->find("template=municipality_page, province%=$choice"); Just can't figure out how to get 'Colombie-Britannique', 'Nouvelle-Écosse' and 'Territoires du Nord-Ouest' to be found. I tried manually with the code below, but it didn't even worked. It also doesn't seemed to be a typo in the field. $entries = $wire->pages->find("template=municipality_page, province%=Colombie-Britannique"); What is missing in the code to be able to find those 3 provinces?
×
×
  • Create New...