Hi,
I’m using Joomla for my websites, while learning css and PHP. the css is going better than the php at the moment, and i’m struggling with one bit. I’m not even sure if what I want is possible.
I have a quotation form, that sends me and email when it is filled out. Within the contact form and email are the usual name/email/address and special instructions. There are also Item 1, 2, 3 and 4 with 4 Quantity boxes next to the item boxes.
Basically, the quantity boxes are all called quantity, which means that they are all given the same title of Quantity in the input class, which then goes to the email, and I view just the last Quantity Box.
I would want the Quantity box to have a title (in the input class) to be quantity1, quantity2, quantity3 and quantity4.
I have edited the code to my liking (not closing the
Below is a very littel bit of the php. The coding is not my work, and is part of a component that someone else has developed.
[php]
if ($field[‘Name’] == “Quantity”)
$result .= $external_label .
'<input ’ .
‘class="’ . $this->TextStyleByValidation($field) . '" ’ .
'type=“text” ’ .
‘value="’ . $value . '" ’ .
‘title="’ . $field[‘Name’] . '" ’ .
‘style="’ ;
else
$result .= $external_label .
'<input ' .
'class="' . $this->TextStyleByValidation($field) . '" ' .
'type="text" ' .
'value="' . $value . '" ' .
'title="' . $field['Name'] . '" ' .
'style="' ;
[/php]
At the moment you can see I have the if statement doing nothing. Hopefully I can add a plus1 or something on the first “'title=”’ . $field[‘Name’] . '" ’ . " and get it to loop round?
The original is below the else, I have just copied it and tried many things! I have tried loops, and was thinking og arrays, but I cannot get anyhting to work at all! I have also asked in a couple of other places, but I cannot get what I want!
Any help would be appreciated!
Many thanks, Matt