Jump to content

brandy

Members
  • Posts

    60
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

brandy's Achievements

Full Member

Full Member (4/6)

6

Reputation

  1. Thanks a lot! But I have a question - page_with_contact_email differs, depending from the site, where its send from. So I mean, I have a parent page with subpages with the different contact-email-adresses. Is this already recognized in this example? Thanks a lot!
  2. In the head there is this: <?php $form = $forms->render('kontakt', [ 'form_page' => $page->parent->title . " " . $page->title ]); ?> And in the template there is this, which shows the form: <?php $processor = $event->object; $processor->emailSubject = "Page title is: $page->title"; $processor->emailTo = "{$page->parent->projekt_bautraeger->bautraeger_mail}"; echo $form; ?> Thanks a lot!
  3. @elabx Do you have an idea, what I´m doing wrong? Thanks a lot!
  4. FYI: I disabled the recipients in the backend, but it doesn´t work either!
  5. Yeah, i forgot it too. I added following: $processor->emailTo = "{$page->parent->projekt_bautraeger->bautraeger_mail}"; As the e-mail is a pageReference-field in the parent, I have to build it like that, but it doesn´t work. The following shows me the emailadress: echo "{$page->parent->projekt_bautraeger->bautraeger_mail}"; Do you think there is a problem, as the form has recipients in the backend? All in all emailTo seems good to me: https://processwire.com/api/ref/form-builder-processor/
  6. Thanks a lot! I do have a construction, like this, for the emailSubject: <?php $processor = $event->object; $processor->emailSubject = "Page title is: $page->title"; echo $form; ?> Is it possible to make it very simple like $processor->emailReceipient = Only a quick thought!
  7. Thanks a lot! But in the file there is no information about the sender. Where does the form get its sending information? Thanks a lot!
  8. Hi! I am using Formbuilder on a website. The form is for contacting, if you are interested in a real estate. With the following code I read out, on which site you are sending the contact form: <?php $form = $forms->render('kontakt', [ 'form_page' => $page->parent->title . " " . $page->title ]); ?> So you receive a mail with the parent-page and page-title as subject, which works perfectly. Is it now possible to extend this and send the contact-form to different mailadresses, depending on the page-parent? I do have a field in the parent, which is linked to the right contact-information. Thanks a lot!
  9. Hi! Thanks! Yeah - I hardcoded the site - but it would be cool, if the domain comes out of processwire.
  10. Hi! I have been trying different things for hours, but it doesn´t work as I think it should. I want to have the full domain as page links in the source code, for example https://domain.at/site1 One try was: <?php echo $config->urls->root?>site1 This works on hovering the link and looks like the example above. But in the source code it´s <a href="/site1".... I also tried <?php echo $config->httpHost?>/site1 This ends in <a href="domain.at/site1" in the source code, but on hovering the link it shows https://domain.at/domain.at/site1 How to I get in the right way? Thanks a lot!
  11. I´ve tried once again, but I can´t find the right way. As said I have made some pages with tour recommendations. Recommendations - recommendation 1 - recommendation 2 ... These recommendations consist of text fields for "kilometer" and "hohenmeter" and page reference fields for the regions where the hotels are. The output with this one works: foreach($page->children() as $vorschlag) { echo "<h3>{$vorschlag->title}<h3> <p>{$vorschlag->tour_start->title}</p> <p>{$vorschlag->tour_kilometer_1} km | {$vorschlag->tour_hohenmeter_1} HM</p> <p>{$vorschlag->tour_ubernachtung_1->title}</p> <p>{$vorschlag->tour_kilometer_2} km | {$vorschlag->tour_hohenmeter_2} HM</p> <p>{$vorschlag->tour_ubernachtung_2->title}</p> <p>{$vorschlag->tour_kilometer_3} km | {$vorschlag->tour_hohenmeter_3} HM</p> <p>{$vorschlag->tour_start->title}</p>"; Now I want to have shown the hotels from the parent "hotels" - matching to the page reference field "tour_start", "tour_ubernachtung_1" and "tour_ubernachtung_2", which defines the region, where the hotel is. I hope you understand. I know it´s just a small adaption from the code form BitPoet, but I´m no sure about the find-part with region: <?php foreach($page->children() as $vorschlag) { echo "<h3>{$vorschlag->title}<h3> <p>{$vorschlag->tour_start->title}<br/>"; $hotels = $pages->find("parent=/unterkuenfte/, region=$tour_start"); foreach($hotels as $hotel) { echo "{$hotel->title}"; } echo "</p>"; echo "<p>{$vorschlag->tour_kilometer_1} km | {$vorschlag->tour_hohenmeter_1} HM</p> <p>{$vorschlag->tour_ubernachtung_1->title}</p> <p>{$vorschlag->tour_kilometer_2} km | {$vorschlag->tour_hohenmeter_2} HM</p> <p>{$vorschlag->tour_ubernachtung_2->title}</p> <p>{$vorschlag->tour_kilometer_3} km | {$vorschlag->tour_hohenmeter_3} HM</p> <p>{$vorschlag->tour_start->title}</p>"; }?> Thanks a lot!
  12. Thanks for the page reference hint - this works fine. But I forgot that I have another layer: I have hotels with the regions-field - every hotel is has one region (made with page references). But now I want to give some tour-recommendations with matching hotels in different regions - for example you can make a tour and sleep in two regions. Now you should see for example: Tour A: Region 1 - Hotel 1 - Hotel 2 Region 2 - Hotel 1 - Hotel 2 Tour B: Region 3 - Hotel 7 - Hotel 8 Region 4 - Hotel 3 - Hotel 4 The page reference with the regions is working in the tour-recommendations. But I don´t know how to connect the region from the tour-recommendation with the region of the hotel, so that the hotel-data is shown. Thanks a lot!
  13. Man, you´re the man - I wasn´t thinking that easy... I will integrate soon and give you an update! Thanks a lot!
  14. It´s interesting that you ask - I was just reading about page->reference in processwire, but didn´t get it. How does it work
  15. Hi! This is my page tree in Processwire: Home - Hotels - - Hotel 1 - - Hotel 2 - - Hotel 3 ... Every hotel has its fields like name, adress and so on. It also has a dropdown-field for the region, in which the hotel is located. Now I want to make another page, where the hotel should appear if the region matches with the region in the hotel-data. There should be a table where some regions are shown and below there should be the matching hotels. Is it possible to link from that new page to an array of all children of "hotels" and if the region matches the hotel should displayed? What is the right tag for that?
×
×
  • Create New...