Norman_12 Posted June 8, 2021 Share Posted June 8, 2021 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 Link to comment Share on other sites More sharing options...
netcarver Posted June 8, 2021 Share Posted June 8, 2021 Hi @Norman_12 Can you explain what you mean? What submitted email? Link to comment Share on other sites More sharing options...
Norman_12 Posted June 8, 2021 Author Share Posted June 8, 2021 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 Link to comment Share on other sites More sharing options...
netcarver Posted June 8, 2021 Share Posted June 8, 2021 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. 1 Link to comment Share on other sites More sharing options...
Norman_12 Posted June 8, 2021 Author Share Posted June 8, 2021 @netcarver Thanks for the reply as i said im a newbie to Processwire, can you tell me where or how i can find what contact form im using Looking forward to hear your thoughts Link to comment Share on other sites More sharing options...
netcarver Posted June 8, 2021 Share Posted June 8, 2021 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? Link to comment Share on other sites More sharing options...
Norman_12 Posted June 8, 2021 Author Share Posted June 8, 2021 Actually i didn't install any module. Should i install Formbuilder in order to acheive what i want ? Link to comment Share on other sites More sharing options...
netcarver Posted June 8, 2021 Share Posted June 8, 2021 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. Link to comment Share on other sites More sharing options...
Norman_12 Posted June 8, 2021 Author Share Posted June 8, 2021 Sure i just uploaded the screenshot Nobody installed any module Link to comment Share on other sites More sharing options...
horst Posted June 8, 2021 Share Posted June 8, 2021 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? Link to comment Share on other sites More sharing options...
netcarver Posted June 8, 2021 Share Posted June 8, 2021 PW 2.7 is really old as well. Did you inherit a website or something? Link to comment Share on other sites More sharing options...
Norman_12 Posted June 9, 2021 Author Share Posted June 9, 2021 Hi @horst I did code it, and i shared a picture of it Link to comment Share on other sites More sharing options...
Norman_12 Posted June 9, 2021 Author Share Posted June 9, 2021 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 ? Link to comment Share on other sites More sharing options...
Norman_12 Posted June 9, 2021 Author Share Posted June 9, 2021 Btw i have searched for FormBuilder and i found it's a paid Module, is there any Free module to test with ? Link to comment Share on other sites More sharing options...
diogo Posted June 9, 2021 Share Posted June 9, 2021 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. 2 1 Link to comment Share on other sites More sharing options...
Norman_12 Posted June 9, 2021 Author Share Posted June 9, 2021 Hi @diogo Thank you so much for the reply, i did as you said, but the table displayed blank Link to comment Share on other sites More sharing options...
diogo Posted June 9, 2021 Share Posted June 9, 2021 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? Link to comment Share on other sites More sharing options...
Norman_12 Posted June 9, 2021 Author Share Posted June 9, 2021 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 Link to comment Share on other sites More sharing options...
diogo Posted June 9, 2021 Share Posted June 9, 2021 Easy ? https://processwire.com/modules/table-csv-import-export/ 2 Link to comment Share on other sites More sharing options...
Norman_12 Posted June 9, 2021 Author Share Posted June 9, 2021 @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 Link to comment Share on other sites More sharing options...
diogo Posted June 9, 2021 Share Posted June 9, 2021 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/ 1 Link to comment Share on other sites More sharing options...
Norman_12 Posted June 9, 2021 Author Share Posted June 9, 2021 @diogo i have followed the instructions and still nothing, i cannot upload modules. Btw i do appreciate your help, you did me a great favor...Thank you Link to comment Share on other sites More sharing options...
diogo Posted June 9, 2021 Share Posted June 9, 2021 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. Link to comment Share on other sites More sharing options...
Norman_12 Posted June 9, 2021 Author Share Posted June 9, 2021 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 Link to comment Share on other sites More sharing options...
Macrura Posted June 9, 2021 Share Posted June 9, 2021 5 hours ago, diogo said: Easy ? https://processwire.com/modules/table-csv-import-export/ That's for ProFields Table, but the OP appears to have this info stored in a Page Table. As far as I'm aware there is no way to export the data in a Page Table without writing a custom script. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now