Get value of a variable knowing the ID and add it in Open graph

1

Dear,

I have the following question, I have tried several possible solutions but I have not achieved it.

I have a form with a Select and 2 textarea fields.

The fields are "Brand" with the variable $ fid = 15, Model with the variable $ fid = 18 and Year with the variable $ fid = 19. I attach the image.

I need to dynamically obtain the value of each of the fields and each entry that is made in the form. In this case the values are FORD, ABC, 2016.

and then add them to an open graph tag, something like the following:

**/ necesito una funcion parecida a esto, se que el codigo esta totalmente erroneo, pero es para que tengan una idea*/

<meta property="og:title" content="'.$_POST [valor del $fid=15].'&'.$_POST [valor del $fid=18]'&'.$_POST [valor del $fid=19]"/>

**/ ejecutado deberia imprimir algo como lo siguiente*/

<meta property="og:title" content="FORD ABC 2016"/>

Thank you very much in advance for your great help.

    
asked by Javier 07.04.2016 в 04:00
source

1 answer

-1

Alvaro Thank you for your interest in helping me. I explain. The form is part of a Joomla component called Sobipro, there are a series of relationships that are made in Php and JS to generate an XML file that disguises the name of the variables in the final HTML. It is easy to access the XML files in sobipro, but unfortunately, the Open graph tags do not work for me, at least not as I need it. So I am adding the meta tags in a header.php template, I take them without problems for other variables. But in this case I can not get the data I need, I send you HTML anyway. Thanks for your interest.

<div>
    <div id="field_makeContainer" class="spFormRowEven">
      <div class="spFormRowLeft">
        <label for="field_make">Marca</label>
      </div>
      <div class="spFormRowRight"><select name="field_make" id="field_make" size="1" class="required" style="width: 350px;">
	
</select> </div>
    </div>
    <div id="field_modeloContainer" class="spFormRowOdd">
      <div class="spFormRowLeft">
        <label for="field_modelo">Modelo</label>
      </div>
      <div class="spFormRowRight"><input type="text" name="field_modelo" value="" id="field_modelo" size="350" class="required" maxlength="150" style="width: 350px;"> </div>
    </div>
    <div id="field_first_registrationContainer" class="spFormRowEven">
      <div class="spFormRowLeft">
        <label for="field_first_registration">Año</label>
      </div>
      <div class="spFormRowRight"><input type="text" name="field_first_registration" value="" id="field_first_registration" size="100" class="required" maxlength="150" style="width: 100px;"> </div>
    </div>
    
answered by 07.04.2016 в 05:15