PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

How i can get the Field_Names over the Field_Number

  1. Soonu96
    Member

    Hi,

    when i execute the following query i got only the field_value but i need the field_name. :(
    How i can get the field_name?

    $results = $wpdb->get_results($wpdb->prepare("  SELECT l.*, field_number, value
                                   FROM wp_rg_lead l
                                   INNER JOIN wp_rg_lead_detail ld ON l.id = ld.lead_id
                                   WHERE l.id=%d
                                   ORDER BY  l.id, field_number", $entry["id"]));

    thx,
    Soonu

    Posted 11 years ago on Wednesday July 21, 2010 | Permalink
  2. Soonu,
    What do you mean by field name? The value specified by the "Parameter name" when you check the "Allow field to be populated dynamically" checkbox? Or do you need the value of the input tag's name attribute (i.e. <input name='field_name' /> ) ?

    Posted 11 years ago on Friday July 23, 2010 | Permalink
  3. Soonu96
    Member

    Hi Alex,

    i need the value of the input tag's name attribute.

    thx

    Posted 11 years ago on Sunday July 25, 2010 | Permalink
  4. The field_number column in your query can be used to create the field name you are looking for. Just add "input_" in front of it. For example, the field name for a field whose field_number is 4 is "input_4".

    Posted 11 years ago on Monday July 26, 2010 | Permalink