No replies
Sansui's picture
Offline
Joined: 06/05/2008
Juice: 154
Was this information Helpful?

We've created a module for a small project that helps the user select the product they need based on their form input. The module looks at their form entries and decides which product fits their specific input values and then forwards them to the product page, which is otherwise hidden.

Once at the product page, we need the values they initially entered to be filled in at the text and select box attributes. The values are just being passed in from the URL

Maybe some string replace trickery?

Example: id="edit-attributes-7" size="60" value=""
Becomes: id="edit-attributes-7" size="60" value="myphpvariable"

I don't know if there's an easier way. If there isn't, and doing some string replace magic will work, how do I get there from the content array? I'm not so hot with php, so not sure what the string replace statement would look like using: $node->content['add_to_cart']["#value"]; and the example above.

Any help is greatly appreciated Smiling