Doubts about phprad, textarea fields and related tables February 05, 2020, 07:26:07 AM I am new to PHPRad. I currently use PHPRunner. I have some questions:1. I can't see the HTML editor in a textarea field2. What editor is it? I think the best one is ckeditor and I don't know if it can be installed myself later3. I don't know how one-to-many relationships are handled. For example, in PHPRunner I have a "News" table, a "Documents" table and a "RelNewsDocs" table that relates, with the key fields, a news with several documents. The question is whether this can be done in PHPad and how. Thank youAttached image of how it looks in phprunnerI would appreciate an image or example Quote Selected
Re: Doubts about phprad, textarea fields and related tables Reply #1 – February 05, 2020, 10:25:57 AM @alfonsog Please read the Phprad docs here: https://docs.radsystems.io/Component Gallery here: https://docs.radsystems.io/gallery/gallery1. You have to turn it ON by setting UseHtmlEditor to True2. it uses a quill editor. And yes you can install the CKEditor later if you know how to install it.3. The One-to-Many Master Details Relationship means that a Master table has a column in the Details table reserved for linking records to it. E.g if you have a Master table called Invoice and a Details table called InvoiceItems, Invoice would have columns called id or number, invoice_details, status, and date, while InvoiceItems table would have columns like this id, item_name, item_price, item_quantity and a column that relates the InvoiceItems record to the Invoice table called Invoice_id or Invoice_number that entails that the current record is related to a record in the Invoice table that has the same id or number as the InvoiceItems Invoice_id or Invoice_number. Quote Selected Last Edit: February 05, 2020, 10:35:48 AM by willvin
Re: Doubts about phprad, textarea fields and related tables Reply #2 – February 06, 2020, 09:51:10 AM Thanks. I put True in htmleditor but I only see a textarea without editorSolved. I can't see html editor in PHPRad, but I can see it in Browser Quote Selected Last Edit: February 06, 2020, 10:21:13 AM by alfonsog
Re: Doubts about phprad, textarea fields and related tables Reply #3 – February 06, 2020, 10:32:07 PM @alfonsog phprad uses the internet explorer as its browser and some of the plugins used in phprad do not support the browser and sometimes you get such issues as you reported above. To avoid such issues, please always use modern browsers like chrome, edge, edge chromium, firefox, opera, etc, to preview your phprad project. Quote Selected
Re: Doubts about phprad, textarea fields and related tables Reply #4 – February 12, 2020, 07:50:19 AM I try to explain what I have done to see if it is possible to do it in PHPRad:1. A news "table" with: id_new, title, text, main_photo2. A "docs" table with: id_doc, title_doc, file_doc3. A "photos" table with: id_photo, title_photo, file_photoNow what I want is that news, documents or photos can be added (no problem in that). My question is:1. How can I relate several documents to a story?2. How can I have several photos related to a story?3. What I want is for a document to relate to different news, for exampleIn PHPRunner I have two new tables:1. a "rel_docs_new" table with: id_rel, id_new_rel, id_doc_rel2. another similar to relate the photosI ask if the approach is correct and how to do it later in PHPRadThanks Quote Selected
Re: Doubts about phprad, textarea fields and related tables Reply #5 – February 16, 2020, 08:26:43 AM Any idea or solution? Quote Selected
Re: Doubts about phprad, textarea fields and related tables Reply #6 – February 16, 2020, 01:49:53 PM @alfonsog 1. By relating it to the new/story that owns it. the "docs" table with: id_doc, title_doc, file_doc would have another field called news_id, that will relate it to the story using a master details relationship.2. The"photostable with: id_photo, title_photo, file_photo would have another field called news_id, that will relate it to the story using a master details relationship. Quote Selected Last Edit: February 16, 2020, 01:52:22 PM by willvin
Re: Doubts about phprad, textarea fields and related tables Reply #7 – February 18, 2020, 05:01:25 PM As you say in point 1, if we have a document that we want to relate to several news, how would it be done? What fields would be necessary? So far we are doing it with a table that relates the news to the documents Quote Selected
Re: Doubts about phprad, textarea fields and related tables Reply #8 – February 18, 2020, 05:02:55 PM The same would happen, I think, with the photo chart. If we add a "news: id" field, I think that only one photo could be related to a story. I don't know how it would be necessary to be able to relate a photo with a lot of news Quote Selected
Re: Doubts about phprad, textarea fields and related tables Reply #9 – February 19, 2020, 06:53:00 PM @alfonsog it is the same way you relate it for a single image, but in this case, the details page would be a List Page, you will see the options in the Master-Details configuration window. Quote Selected
Re: Doubts about phprad, textarea fields and related tables Reply #10 – February 23, 2020, 10:07:59 AM Ok, but I would like to add/edit/delete in the same window, if possible Quote Selected