Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7000959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T20:44:28+00:00 2026-05-27T20:44:28+00:00

This is my code: function theme_freeway_dashboard_details($form) { $pidobtained = $_GET[‘project_id’] ; $rows = array();

  • 0

This is my code:

 function theme_freeway_dashboard_details($form) {

$pidobtained = $_GET['project_id'] ;

    $rows = array();
    foreach (element_children($form) as $key) {

            $row = array();                 
                $row[] = array('data' => drupal_render($form[$key]['FileID']));
                $row[] = array('data' => drupal_render($form[$key]['Filename']));
                $row[] = array('data' => drupal_render($form[$key]['SourceLanguageID']));
                $row[] = array('data' => drupal_render($form[$key]['TargetLanguageID']));
                $row[] = array('data' => l(drupal_render($form[$key]['StatusID']),'user/1/freewayRetrieve',array('query' => array('fileId'=> $row[0],'projectID'=> $pidobtained))));                            
                $row[] = array('data' => drupal_render($form[$key]['StatusDescription']));                      
                $rows[] = $row;


            }
            $header = array();
            $header[] = t('File ID');
            $header[] = t('File Name');
            $header[] = t('Source Language');
            $header[] = t('Target Language');
            $header[] = t('Status ID');
            $header[] = t('Status Description');


            //$output = theme('table', $header, $rows,array('size'=>10, 'class' => 'table_class'));
            $output = theme('table', $header, $rows);
            $output .= drupal_render($form);


        return $output;

    }

I am trying to pass paremeter on click on the link, the parameter being FileID. The URL being generated as a result of the above code is

   'http://localhost/drupalTheme/user/1/freewayRetrieve?fileId[data]=157960&projectID=437286' . 

Now when i try to get the values from this URL from the subsequesnt function using

   <?php
    $fileIdbtained = $_GET['fileId[data]'] ;
    $pidobtained = $_GET['projectID'] ;
    ?>

I am getting the value for projectID but not for fileID. Is this the correct way to go about accessing the parameters?
Would like to have your views.

Thanks
A

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T20:44:28+00:00Added an answer on May 27, 2026 at 8:44 pm

    To be clear: In your foreach loop, $form[$key]['FileID'] is a FAPI element.

    In other words: In every iteration of the loop, the variable $form[$key]['FileID'] (as well as $form[$key]['Filename'] and the others) is a PHP array which has a specific structure.

    This “specific structure” is one that is expected by drupal_render() so that it knows how to “render” the element (that is, generate a string of HTML).

    Now, for the case where you want to get the actual semantic value (i.e. 157960) of $form[$key]['FileID'] without the HTML, first you obviously have to stop passing it through drupal_render().

    Then, since $form[$key]['FileID'] is an array (which happens to hold the structure of a FAPI element, as I mentioned previously) you need to access whichever of its elements holds the actual data you’re after. And according to your latest update, that element would be the one with a key of ‘#value’.

    So, what you want to use is $form[$key]['FileID']['#value']. That is, the line of code that prepares that row, should be:

    $row[] = array('data' => l(drupal_render($form[$key]['StatusID']),'user/1/freewayRetrieve',array('query' => array('fileId'=> $form[$key]['FileID']['#value'],'projectID'=> $pidobtained))));
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following piece of code from a book. There is this function
This code function LoadContent(Id) { alert('Controls/Network/NetworkDetail.aspx?' + rnd() + '&CtlId=' + Id); $.get('Controls/Network/NetworkDetail.aspx?' +
View this code: function testprecision(){ var isNotNumber = parseFloat('1.3').toPrecision(6); alert(typeof isNotNumber); //=> string }
With this code function someFunction(classParam:Class):Boolean { // how to know if classParam implements some
I have this code: function submitTwice(f){ f.action = 'http://mydomain.com/threevideopage.php'; f.target='name'; f.submit(); } I left
Hello I get a weird error in this code: function validateForm(aform) { var s=;
I have just come across this code: function test(){ //... if ( $profilerule ==
i have this code $(function() { $('#ans_vote a span').click(function(){alert('working');return false;});}); and this html <div
This code does not function as expected: // $field contains the name of a
I'm using jsTree 1.0. And have this code : $(document).ready(function () { $(#folders_tree).jstree({ core:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.