Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - phpdad

1
Questions / Reports structure
Does anyone have a video or example of how they generated their reports?

I've been absent from phprad for a bit, but I'm prepping to get back into my project.

I'm collecting the data I want to have in a proper way now,
It's similar to
date
teacher
student
class
goal
goal rating - with the star rating.

What I'd like to do next is select
Teacher
Student
Date

To see star ratings or bar graph report for the particular date

Once that's accomplished I'd like to see a star or bar graph of 
average rating over 7 days, 30 days, 3 months...

Does anyone have anything similar going on that I might be able to use for reference or ideas?

Thank you.


2
Questions / Re: Column Wrap Help
If its possible to enter a remote session with you again, or have you link me to a video where you edit this sort of thing, I'd be most grateful. In custom when I do duplicate the table code, and remove the portions I don't want to see it doesn't modify.

Thank you.
3
Questions / Re: Column Wrap Help
Do you happen to have a recommendation on how I could most efficiently achieve this?

Am I able to add something to the code I shared to split it into the other column? I tried adding two of the table view elements, and then wanted to go into the "custom" portion and delete some of the fields from each in the code, but the code didnt duplicate like I was anticipating. I'm having trouble wrapping my head around it....

Should I be able to break this data into 2 columns easily, or should I change the way in which data gets entered?

Thank you again also. I appreciate that you have the answers.
4
Questions / Re: Column Wrap Help
I guess I don't even know what to call my problem.
Column wrap doesn't appear to be it.

If you're unable to help, but know what I should call the issue when looking up answers, please let me know.

I'd like half the chart in one column, and the other half in a second column.

Thank you.
6
Questions / Column Wrap Help
Hello, if someone has time, can i get some help with Column Wrap?

My view page is filling one column across 2 pages, but I want to fill one page if possible. I've been trying to follow along with notes in here, and also a bootstrap page but I'm not understanding.

 
Code: [Select]
<?php

$counter = 0;
if(!empty($data)){
$rec_id = (!empty($data['id']) ? urlencode($data['id']) : null);



$counter++;
?>
<div id="page-report-body" class="">
   
    <table class="table table-hover table-borderless table-striped">
        <!-- Table Body Start -->
        <tbody class="page-data" id="page-data-<?php echo $page_element_id; ?>">
           
            <tr  class="td-Teacher_Name">
                <th class="title"> Teacher Name: </th>
                <td class="value">
                    <span  data-source='<?php print_link('api/json/chart_Teacher_Name_option_list'); ?>'
                        data-value="<?php echo $data['Teacher_Name']; ?>"
                        data-pk="<?php echo $data['id'] ?>"
                        data-url="<?php print_link("chart/editfield/" . urlencode($data['id'])); ?>"
                        data-name="Teacher_Name"
                        data-title="Select a value ..."
                        data-placement="left"
                        data-toggle="click"
                        data-type="select"
                        data-mode="popover"
                        data-showbuttons="left"
                        class="is-editable" >
                        <?php echo $data['Teacher_Name']; ?>
                    </span>
                </td>
            </tr>
           
           
            <tr  class="td-Student_Name">
                <th class="title"> Student Name: </th>
                <td class="value">
                    <span  data-source='<?php
                        $dependent_field = (!empty($data['Teacher_Name']) ? urlencode($data['Teacher_Name']) : null);
                        print_link('api/json/chart_Student_Name_option_list/'.$dependent_field);
                        ?>'
                        data-value="<?php echo $data['Student_Name']; ?>"
                        data-pk="<?php echo $data['id'] ?>"
                        data-url="<?php print_link("chart/editfield/" . urlencode($data['id'])); ?>"
                        data-name="Student_Name"
                        data-title="Select a value ..."
                        data-placement="left"
                        data-toggle="click"
                        data-type="select"
                        data-mode="popover"
                        data-showbuttons="left"
                        class="is-editable" >
                        <?php echo $data['Student_Name']; ?>
                    </span>
                </td>
            </tr>
           
           
            <tr  class="td-Date">
                <th class="title"> Date: </th>
                <td class="value">
                    <span  data-flatpickr="{altFormat: 'F j, Y - H:i', minDate: '', maxDate: ''}"
                        data-value="<?php echo $data['Date']; ?>"
                        data-pk="<?php echo $data['id'] ?>"
                        data-url="<?php print_link("chart/editfield/" . urlencode($data['id'])); ?>"
                        data-name="Date"
                        data-title="Enter Date"
                        data-placement="left"
                        data-toggle="click"
                        data-type="flatdatetimepicker"
                        data-mode="popover"
                        data-showbuttons="left"
                        class="is-editable" >
                        <?php echo $data['Date']; ?>
                    </span>
                </td>
            </tr>
           
           
            <tr  class="td-Goal_1">
                <th class="title"> Goal 1: </th>
                <td class="value">
                    <span  data-value="<?php echo $data['Goal_1']; ?>"
                        data-pk="<?php echo $data['id'] ?>"
                        data-url="<?php print_link("chart/editfield/" . urlencode($data['id'])); ?>"
                        data-name="Goal_1"
                        data-title="Enter Goal 1"
                        data-placement="left"
                        data-toggle="click"
                        data-type="text"
                        data-mode="popover"
                        data-showbuttons="left"
                        class="is-editable" >
                        <?php echo $data['Goal_1']; ?>
                    </span>
                </td>
            </tr>
           
           
            <tr  class="td-Goal_1_p1">
                <th class="title"> Goal 1 P1: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_1_p1'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_1_p2">
                <th class="title"> Goal 1 P2: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_1_p2'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_1_p3">
                <th class="title"> Goal 1 P3: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_1_p3'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_1_p4">
                <th class="title"> Goal 1 P4: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_1_p4'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_1_p5">
                <th class="title"> Goal 1 P5: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_1_p5'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_1_p6">
                <th class="title"> Goal 1 P6: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_1_p6'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_1_p7">
                <th class="title"> Goal 1 P7: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_1_p7'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_1_p8">
                <th class="title"> Goal 1 P8: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_1_p8'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_2">
                <th class="title"> Goal 2: </th>
                <td class="value">
                    <span  data-value="<?php echo $data['Goal_2']; ?>"
                        data-pk="<?php echo $data['id'] ?>"
                        data-url="<?php print_link("chart/editfield/" . urlencode($data['id'])); ?>"
                        data-name="Goal_2"
                        data-title="Enter Goal 2"
                        data-placement="left"
                        data-toggle="click"
                        data-type="text"
                        data-mode="popover"
                        data-showbuttons="left"
                        class="is-editable" >
                        <?php echo $data['Goal_2']; ?>
                    </span>
                </td>
            </tr>
           
           
            <tr  class="td-Goal_2_p1">
                <th class="title"> Goal 2 P1: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_2_p1'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_2_p2">
                <th class="title"> Goal 2 P2: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_2_p2'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_2_p3">
                <th class="title"> Goal 2 P3: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_2_p3'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_2_p4">
                <th class="title"> Goal 2 P4: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_2_p4'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_2_p5">
                <th class="title"> Goal 2 P5: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_2_p5'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_2_p6">
                <th class="title"> Goal 2 P6: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_2_p6'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_2_p7">
                <th class="title"> Goal 2 P7: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_2_p7'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_2_p8">
                <th class="title"> Goal 2 P8: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_2_p8'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_3">
                <th class="title"> Goal 3: </th>
                <td class="value">
                    <span  data-value="<?php echo $data['Goal_3']; ?>"
                        data-pk="<?php echo $data['id'] ?>"
                        data-url="<?php print_link("chart/editfield/" . urlencode($data['id'])); ?>"
                        data-name="Goal_3"
                        data-title="Enter Goal 3"
                        data-placement="left"
                        data-toggle="click"
                        data-type="text"
                        data-mode="popover"
                        data-showbuttons="left"
                        class="is-editable" >
                        <?php echo $data['Goal_3']; ?>
                    </span>
                </td>
            </tr>
           
           
            <tr  class="td-Goal_3_p1">
                <th class="title"> Goal 3 P1: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_3_p1'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_3_p2">
                <th class="title"> Goal 3 P2: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_3_p2'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_3_p3">
                <th class="title"> Goal 3 P3: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_3_p3'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_3_p4">
                <th class="title"> Goal 3 P4: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_3_p4'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_3_p5">
                <th class="title"> Goal 3 P5: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_3_p5'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_3_p6">
                <th class="title"> Goal 3 P6: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_3_p6'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_3_p7">
                <th class="title"> Goal 3 P7: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_3_p7'], "5") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_3_p8">
                <th class="title"> Goal 3 P8: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_3_p8'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_4">
                <th class="title"> Goal 4: </th>
                <td class="value">
                    <span  data-value="<?php echo $data['Goal_4']; ?>"
                        data-pk="<?php echo $data['id'] ?>"
                        data-url="<?php print_link("chart/editfield/" . urlencode($data['id'])); ?>"
                        data-name="Goal_4"
                        data-title="Enter Goal 4"
                        data-placement="left"
                        data-toggle="click"
                        data-type="text"
                        data-mode="popover"
                        data-showbuttons="left"
                        class="is-editable" >
                        <?php echo $data['Goal_4']; ?>
                    </span>
                </td>
            </tr>
           
           
            <tr  class="td-Goal_4_p1">
                <th class="title"> Goal 4 P1: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_4_p1'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_4_p2">
                <th class="title"> Goal 4 P2: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_4_p2'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_4_p3">
                <th class="title"> Goal 4 P3: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_4_p3'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_4_p4">
                <th class="title"> Goal 4 P4: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_4_p4'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_4_p5">
                <th class="title"> Goal 4 P5: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_4_p5'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_4_p6">
                <th class="title"> Goal 4 P6: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_4_p6'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_4_p7">
                <th class="title"> Goal 4 P7: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_4_p7'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Goal_4_p8">
                <th class="title"> Goal 4 P8: </th>
                <td class="value"><?php Html :: star_rating($data['Goal_4_p8'], "7") ?></td>
            </tr>
           
           
            <tr  class="td-Comments">
                <th class="title"> Comments: </th>
                <td class="value">
                    <span  data-value="<?php echo $data['Comments']; ?>"
                        data-pk="<?php echo $data['id'] ?>"
                        data-url="<?php print_link("chart/editfield/" . urlencode($data['id'])); ?>"
                        data-name="Comments"
                        data-title="Notable Comments"
                        data-placement="left"
                        data-toggle="click"
                        data-type="text"
                        data-mode="popover"
                        data-showbuttons="left"
                        class="is-editable" >
                        <?php echo $data['Comments']; ?>
                    </span>
                </td>
            </tr>
           
           
        </tbody>
        <!-- Table Body End -->
    </table>
</div>
<div class="p-3 d-flex">
   
   
    <div class="dropup export-btn-holder mx-1">
        <button class="btn btn-sm btn-primary dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
            <i class="fa fa-save"></i> Export
        </button>
        <div class="dropdown-menu" aria-labelledby="dropdownMenuButton">
           
            <?php $export_print_link = $this->set_current_page_link(array('format' => 'print')); ?>
            <a class="dropdown-item export-link-btn" data-format="print" href="<?php print_link($export_print_link); ?>" target="_blank">
                <img src="<?php print_link('assets/images/print.png') ?>" class="mr-2" /> PRINT
                </a>
               
               
                <?php $export_pdf_link = $this->set_current_page_link(array('format' => 'pdf')); ?>
                <a class="dropdown-item export-link-btn" data-format="pdf" href="<?php print_link($export_pdf_link); ?>" target="_blank">
                    <img src="<?php print_link('assets/images/pdf.png') ?>" class="mr-2" /> PDF
                    </a>
                   
                   
                    <?php $export_word_link = $this->set_current_page_link(array('format' => 'word')); ?>
                    <a class="dropdown-item export-link-btn" data-format="word" href="<?php print_link($export_word_link); ?>" target="_blank">
                        <img src="<?php print_link('assets/images/doc.png') ?>" class="mr-2" /> WORD
                        </a>
                       
                       
                        <?php $export_csv_link = $this->set_current_page_link(array('format' => 'csv')); ?>
                        <a class="dropdown-item export-link-btn" data-format="csv" href="<?php print_link($export_csv_link); ?>" target="_blank">
                            <img src="<?php print_link('assets/images/csv.png') ?>" class="mr-2" /> CSV
                            </a>
                           
                           
                            <?php $export_excel_link = $this->set_current_page_link(array('format' => 'excel')); ?>
                            <a class="dropdown-item export-link-btn" data-format="excel" href="<?php print_link($export_excel_link); ?>" target="_blank">
                                <img src="<?php print_link('assets/images/xsl.png') ?>" class="mr-2" /> EXCEL
                                </a>
                               
                               
                            </div>
                        </div>
                       
                       
                        <a class="btn btn-sm btn-info"  href="<?php print_link("chart/edit/$rec_id"); ?>">
                            <i class="fa fa-edit"></i> Edit
                        </a>
                       
                       
                       
                    </div>
                    <?php
                    }
                    else{
                    ?>
                    <!-- Empty Record Message -->
                    <div class="text-muted p-3">
                        <i class="fa fa-ban"></i> [html-lang-0009]
                    </div>
                    <?php
                    }
                    ?>
7
Questions / Re: Combining and adding graphs
My trial ran out.. I decided to pay anyway and try to move forward.
If there is a way I could word my question more effectively please let me know. I think I'm explaining too elaborately, but could maybe use some assistance in trying to ask my question in a better way?

In my form if someone completes the same form 8 different times in the same day, is it possible for me to make a summary page that shows all 8 results based on the date?

Thank you,

8
Questions / Combining and adding graphs
Hello, back again.. ;D

My data collection is set up the way I'd like it to be now.

I'd like to make a "Reports" page now, and I'm stuck a bit. If you have a tutorial to recommend, please let me know. I've watched a couple a few times, but not understanding yet.

My data collection sets up a table like

Teacher_Name | Student_Name | Date | Period | Goal_1 | Goal_1_Score | Goal_2 | Goal_2_Score | Goal_3 | Goal_3_Score | Goal_4 | Goal_4_Score | Comments

Am I able to make a page that shows

Teacher_Name drop down
Student_Name drop down

then a table like

     4|
     3|            
     2|                                                          
     1|
     ________________________
     Goal_1       Goal_2    Goal_3  Goal_4

with chart values showing a bar for Goal_1 period 1 score (1-4)
                                                         Goal_1 period 2 score (1-4)
                                                         ...... additional Goal_1 scores per period
                                                         Goal_2 period 1 score (1-4)

I want my chart to have all Goal scores be grouped together by Goal per period, and I'd like to do this based on the particular day.
11
Questions / Re: Reference fields dynamically based on previous entry.
@phpdad I think the issue is with your MySql query for the default value. Please note that the value your query should return should be a single value and not a list. And from what I see on your query, you just copied the query generated for you from the select field and paste in in the Selected Default value, which is wrong.

Your query should look like this
Code: [Select]
SELECT Goal_1 FROM students WHERE (Goal_1 = 'Dance Better')


Thank you. I think I may be trying to do something that's not supported, or possibly need another trick to get me there.
https://photos.app.goo.gl/rMpvR25MnY6tF25DA  <- Video

When I select the student I want Goal_1 to show the personalized individual goal that was set, like "Get Better at coding" in this example.

Then I can have a table of all the relevant info I'd need for reports.
12
Questions / Re: Reference fields dynamically based on previous entry.
Thank you @willvin I greatly appreciate your reply.

I gave it a shot, but might still be missing or overlooking something. When I disable the field entry I see the placeholder text, but not the value.

Disabled Set to True: https://photos.app.goo.gl/ZBf1a9Ag8dL4W1Zd8

Disabled Set to False: https://photos.app.goo.gl/onvjUBnFWXf6CmUS8

In this case I'm trying to get "Dance Better" to show where my placeholder text is showing.

Thank you again for your assistance.
13
Questions / Re: Reference fields dynamically based on previous entry.
Thank you. I did see that option in the other page fields, but not in Select. I might be looking in the wrong area.

I tried to upload pics of examples, but "the upload directory is full."

https://photos.app.goo.gl/Ue3ycq8Paf34j9gz7

That's the area I was poking around in, and I also included a snap of the page to better explain what I mean.

On my page I have to click the drop down to display a value, but I'd like for the value to show automatically. I'm using LookupDependentField to match the goal to the student because Goal_1 is a unique value for each student. On the snip example Goal_2 and Goal_3 are displaying how I'd like, but display incorrect info because they don't reference the Student_Name.  If you're able to guide me in a different way to yield the same result I'm open to that also. I'm quite new at this, but trying to invest the time to improve.

Thanks for your Youtube videos.

14
Questions / Reference fields dynamically based on previous entry.
When I use LookupDependentField, and LookupDependentMatchField on the page I want-  I am able to see "Select A Value" Placeholder drop down box with the correct answer present..

Is it possible to skip the "Select a Value" and see a read only version of that answer displayed without additional clicking/selecting?

When I attempt to do Default Selected Value I think I may be doing it incorrectly if that's the solution...

"SELECT  DISTINCT Goal_1 AS value,Goal_1 AS label FROM student"

I have 3 tables-
Student      - this table has Student_Name, Goal_1, Goal_2, Teacher_Name
Teacher      - Teacher_Name
Chart         - Teacher_Name, Student_Name, Goal_1, Goal_1_value, Goal_2, Goal_2_value, etc...

I want Chart/Add to:

Select a Student and show a read only copy of Goal_1 so that I can assess and assign a  value to Goal_1

Please let me know if I can explain in greater detail. Thank you!