Forums

Link between two forms - View more details...

alan.bagley 12 Mar, 2010
Hi,

firstly thanks for the support this forum offers. I am almost done with my current project, all I need to do is display the database entries on 2 pages:

I have 2 connections set up to read the same database, the first page head code:


<table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2">
      <tbody>
        <tr>
          <td style="font-weight: bold; width: 16%;">Title</td>
          <td style="font-weight: bold; width: 16%;">Type</td>
          <td style="font-weight: bold; width: 16%;">Industry</td>
          <td style="font-weight: bold; width: 16%;">Salary</td>
          <td style="font-weight: bold; width: 16%;">Location</td>
          <td style="font-weight: bold; width: 16%;">View / Apply</td>
        </tr>
      </tbody>
    </table>


The body will then pull out the required data:


<table style="text-align: left; width: 100%;" border="0" cellpadding="2" cellspacing="2">
      <tbody>
        <tr>
          <td style="width: 16%;">{job_title}</td>
          <td style="width: 16%;">{job_type}</td>
          <td style="width: 16%;">{job_industry}</td>
          <td style="width: 16%;">{salary_per}</td>
          <td style="width: 16%;">{job_location}</td>
          <td style="width: 16%;"><a href='/index.php?option=com_chronoconnectivity&connectionname=full_job_view&id={cf_id}' >View more details >></a></td>
        </tr>
      </tbody>
    </table>


in the body code the link to the second form, links and passes through the ID of the record but the page always shows same job, which seems to be the last one entered in the database.

The site can be seen here:
http://nextmoveit.co.uk/component/option,com_chronoconnectivity/Itemid,4/

Please advise

Best regards
Alan
GreyHead 12 Mar, 2010
Hi Alan,

No helpful solutions - I'd turn on site debug and take a look to see what is in the MySQL queries. It looks as though the ID in the URL is being lost somewhere.

Bob

PS Neat that you've used CC for the detail displays - I think I've always switched to a form there.
alan.bagley 12 Mar, 2010
Hi Bob,

thanks, and will switch on debug to see what is happening. You mention that you would switch to a form for the details view, is that easy enough to do? I had not thought of doing it that way and maybe, just maybe that is what is causing me this issue!!

Alan
GreyHead 12 Mar, 2010
Hi alan.bagley,

I would use a form (possibly with the profile plugin) I think. You already have the id in the URL and you can probably copy and paste over the body code from the ChronoConnection into the Form HTML of the form.

NB ChronoForms don't have to be forms - you can put any PHP + HTML, etc in there.

Bob
alan.bagley 12 Mar, 2010
Hi Bob,

I must of missed something, I now connect to a form, has applied the "profile page" to the form, my Target field name is cf_id but the output is now: Reference No: {job_reference} etc no the data, have I missed something simple?

Alan
GreyHead 12 Mar, 2010
Hi alan.bagley,

Enabling the plugin ??

Bob
alan.bagley 12 Mar, 2010
Hi Bob,

yeah I did that, I had forgotten, in the plugin section, green = on red = off that correct?

So now I get the form showing but no data population, looking at the Configure Profile Table plugin
do I need to fill in the following:

Request' parameter name:
Default Request Parameter value:
Evaluate code: yes / no

Regards
Alan
GreyHead 12 Mar, 2010
Hi Alan,

Yes you need the parameter name from the URL in the first of those boxes.

Bob
alan.bagley 12 Mar, 2010
Hi Bob,

Okay, confused, the url is this: /index.php?option=com_chronocontact&chronoformname=full_job_view&id=57

The id=57 changes per database record so what would I put in the Request' parameter name

Alan
alan.bagley 12 Mar, 2010
Okay, sorted it, I just had to add id to the Request' parameter name so now the form knows where to look, easy really

Alan
This topic is locked and no more replies can be posted.