Jump to content

depone

Members
  • Posts

    6
  • Joined

  • Last visited

depone's Achievements

Newbie

Newbie (2/6)

1

Reputation

  1. Thanks again @adrian! In my case the solution is a combination of your two suggestions. In the first place I am checking if the page is viewed in the default language and return description in the default language. If the page is viewed in another language I use your suggested get-code and display a caption, if there is one: if ($defaultLanguage) { $out .= "<figcaption>{$image->description}</figcaption>"; } else { $out .= "<figcaption>{$translatedDescription}</figcaption>"; }
  2. @adrian thanks for your reply. Sorry, my question wasn’t precise enough. I would like to display captions if they are translated, but need to hide the fallback if there is no translation available of given description.
  3. Hey all, I am trying to prevent the display of descriptions for images in default language while user browses site with alternative language. In a gallery my goal would be to display the same images, and hide the description that I am using as captions. As a hack I could decide based on tags, but this causes extra workload for the editors of the site, and seems less robust than a built in query. Any hints are highly appreciated.
  4. Hi @justb3a, to assist the receiver in answering to the sender, I would like to add a Reply-To-Header to the form. To achieve this I have added the following code to SimpleContactForm.module: // Set variable for E-Mail-Address to reply to foreach ($this->emailFields as $emailField) { $replyToEmail = $this->sanitizer->email($this->input->post->{$emailField}); } // Add Reply-To header $wireMail->header('Reply-To', $replyToEmail); Would this be a feature you’d like to add to the Module? If yes I could fork the Repo on Github and create a Pull Request …
  5. Hi @justb3a, thank you very much for your fast reply. The submitName is now working. I forgot to explicitly set a templateName on both instances, because I assumed it would fallback to the default if nothing is declared. If I set templateName and submitName on both it works. Thanks for the description of the submit-behavior. I am currently highlighting the required fields if the user moves forward without filling them out, what seems as a legit workaround. With one form I am running into – [FAILURE] Number of fields does not match. – even though the same hidden fields are available as on the other form. The form itself has one more field than the other one, but I set them with the allFields-key. Do you have a hint for me what I might have overlooked? Thanks, Depone Edit 2016-04-14: fixed – error was caused by a field-name mismatch.
  6. Hi @justb3a, thanks for the module. I am currently trying to use SimpleContactForm (PW 2.7.2 // SCF 0.2.1) with two templates on one page (for contacting the owner and for signing up to the newsletter (e-mail and printed)). I was trying to use: $options = array ( 'submitName' => 'newname' but this caused the whole page to throw an error. Would be great if you would have a hint for me to get submitName to work. Is there a way to prevent the form to load the homepage when an error occurs. When using ajax I would like the form to set some classes on the erroneous fields – did I miss something? Thanks for your feedback, Depone
×
×
  • Create New...