Jump to content

Recommended Posts

Posted

Hi Guys im using Processwire 2.7.2  and still discovering the platfom.

is it possible to store all the submitted email in a one page table instead of each page for each submitted email ?

Looking forward to hear your thoughts

Posted

Hi @netcarver  Thanks for the reply

i mean when a user sent an email via contact page, the email stores as children of page Contact, and same thing for each email 

See link : https://prnt.sc/14q5cu0

is it possible to store all the emails in one page and in a table for an easy access ?

Looking forward to hear your thoughts

Posted

If you are talking about displaying all the emails in a table, then you can just use the PW API to fetch the children of the contact form page and display them in an HTML5 table.

If you can let us know what contact form you are using, maybe we could point you further towards a solution.

Also, could you just post the screenshots here in the forum rather than links to screen shots stored elsewhere.

  • Like 1
Posted

Did you install a module, or follow a tutorial somewhere to get your contact form set up?  Are you using formbuilder or something like that?

Posted

PW isn't a system that automatically collects emails, so I actually have no idea what you are talking about now. If you didn't install a contact page, who did?

The link you posted above doesn't seem to work for me, could you post the actual screen shot you took here please.

Posted
35 minutes ago, Norman_12 said:

Nobody installed any module

Then someone has coded a template file with the logic for the contact form!? Who, or how does it looks like?

Posted

Hi @netcarver

i used an old ready website and i only changed the template. 

i mean i didn't download and installed a new processwire project

is that what you mean by Did i inherit a website or something ?

Posted

If the system is working well, and all you want to change is this detail, you can can use the Page Table field (it's in the core, you just have to install it). If all you want is to have an easy way to look at those contacts, and don't mind still having those pages as children, just create a "ProFields: Page Table" field, set "Select one or more templates for items" to "contact", and leave "Select a parent for items" empty.

Then add this to your code right after $p->save();

$contacts_page = $pages->get("/contact/");
$contacts_page->of(false);
$contacts_page->contacts->add($p); // assuming the name of the new field is "contacts"
$contacts_page->save();

If, for any reason, you don't want the pages as children of the contacts page, you can create a page only for this purpose, and set it as the value to "Select a parent for items" in the field. Then you just have to replace $pages->get("/contact/") in the code by the correct parent.

 

 

 

 

  • Like 2
  • Thanks 1
Posted

When you click the edit icon on those rows, does it open a contact page? Also, in the "Table fields to display in admin"area, did you write the names of the fields exactly, including text case, as they are stated on the yellow note below it?

Posted

Hi @diogo Your solution worked fine and in i really thank you for that.

i have like one more question if you please, How to export the data stored in my  "ProFields: Page Table" field in a CSV file ?

Looking forward to hear your thoughts

export.PNG

Posted

@diogo it seems like  "TableCsvImportExport"  required other modules in order to install.

Plus i'm no longer able to upload modules after upgrading my Processwire  from 3.0.96 to 3.0.165

upload-fail.PNG

Posted

Just follow the instructions on those messages. Add one of the suggested options to the end of your config.php file. This file is situated in the "site" directory of your Processwire install.

Be aware that the debug option should be used only only on non public websites, so don't forget to remove it when you publish. Or just use the second option to always allow installing modules via upload. You can also add modules manually via ftp, as you can see on the bottom of your screenshot. Make sure to get yourself acquainted with how to install modules https://modules.processwire.com/install-uninstall/

  • Like 1
Posted

Interesting, should work, but can you try with the debug option instead?

You can also with the manual option if that doesn't work. It would at least get you going with the work while you check what's wrong with this.

Posted

i tried the debug option set it to true, still not working.  and even when i uploaded it manually, cant find it module processwire to install it

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...