Results 1 to 6 of 6

Thread: problem show data in EditView.html

  1. #1
    ojalà is offline Senior Member
    Join Date
    Dec 2008
    Posts
    28

    Default problem show data in EditView.html

    Hi!
    I can't print my value in a select in my EditView.html
    In EditViwe.php I write:

    $focus = new Documents();
    $attac = $db->query("SELECT * FROM documents where attachment is null");
    while (($focus = $db->fetchByAssoc($attac) ) != null ){
    //print_r($focus);
    $xtpl->assign("ATTACH", $focus['name']);
    }

    query is correct, I can see my data, my problem is print this data in my select in EditView.html.
    I write:

    <select name="name">{ATTACH}</select>

    what is wrong?I think problem is about $focus, can you help me?

  2. #2
    vishwasrao's Avatar
    vishwasrao is offline A Prolific Poster
    Join Date
    Sep 2008
    Location
    Pune,Maharashtra,India
    Posts
    385

    Smile Re: problem show data in EditView.html

    Hi ,
    where this editview.php lies
    is it editviewdefs.php in metadata or anything else
    Vishwasrao Salunkhe
    vishwasrao.salunkhe@gmail.com
    Fan Of Sachin Tendulkar
    Operating System :- Windows XP
    PHP Version:- 5.3
    Apache :-2.2.11
    MYSQL :-5.1.36

  3. #3
    ojalà is offline Senior Member
    Join Date
    Dec 2008
    Posts
    28

    Default Re: problem show data in EditView.html

    My EditView.php in inside modules (Documents module)

  4. #4
    ojalà is offline Senior Member
    Join Date
    Dec 2008
    Posts
    28

    Default Re: problem show data in EditView.html

    nobody can hel me??

  5. #5
    dlorenzetti's Avatar
    dlorenzetti is offline Sugar Community Member
    Join Date
    Jan 2008
    Location
    São Paulo, Brasil
    Posts
    189

    Default Re: problem show data in EditView.html

    Hello,

    Try this:

    PHP Code:
    $attac_options = array();
    $focus = new Documents();
    $attac $db->query("SELECT * FROM documents where attachment is null");
    while ((
    $focus $db->fetchByAssoc($attac) ) != null ){
    //print_r($focus);
    $attac_options[$focus['name']] = $focus['name'];
    }

    $xtpl->assign("ATTACH"get_select_options_with_id($attac_options)); 
    Diego Lorenzetti
    Lampada Global Services - Open Source Solutions
    Phone: +55 11 3237-3110
    Email: equipe@lampadaglobal.com
    Site: www.lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

  6. #6
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: problem show data in EditView.html

    There is something wrong here:

    PHP Code:
    $focus = new Documents(); # That is right
    $attac $db->query("SELECT * FROM documents where attachment is null"); # Did you instantiate the $db variable as $db = & PearDatabase::getInstance();???
    while (($focus $db->fetchByAssoc($attac) ) != null ) { # Here you are overloading the just declared $focus. Before it was an object reference, now it is an array.
      //print_r($focus);
      
    $xtpl->assign("ATTACH"$focus['name']);

    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. editview.html/php -> editviewdefs.php
    By meeric in forum Developer Help
    Replies: 1
    Last Post: 2008-10-14, 12:34 PM
  2. Help! Opportunities/EditView.html
    By danccg in forum Developer Help
    Replies: 0
    Last Post: 2007-02-19, 04:14 PM
  3. EditView.html
    By alopez in forum Español
    Replies: 0
    Last Post: 2007-01-23, 08:02 AM
  4. EditView.html in one module has no dropdowns.
    By mlh in forum Developer Help
    Replies: 0
    Last Post: 2006-09-01, 05:04 PM
  5. <slot> tag in DetailView.html, EditView.html, ...?
    By sugarcrmvn in forum General Discussion
    Replies: 2
    Last Post: 2006-04-07, 03:07 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •