Forums

How to obtain values from current page?

buzzet 24 May, 2010
Hi

Would you suggest me the way to obtain the values (such as text or fields) from current page HTML where the form is placed.

For example. I'm pasting the form as a module in the ZOO catalog and I have a text value called 'Label' that is attached to every product in this catalog. How can I obtain this value and paste it to the form? If possible recommend me please PHP function that I need insert to the form to get the result.

Thank you.
GreyHead 24 May, 2010
Hi buzzet,

I don't know anything about ZOO. Possibly you could add a variable to the page URL? Or I guess you could write a script to check the label adn add the value to a hidden field in the form?

Bob
buzzet 24 May, 2010
Sure. But let's rest ZOO in peace. How I can obtain HTML code from current page?

That is the piece of HTML code there I put the form (just local for a test purpose):


<div id="maincolumn_full">
<table class="nopad">
<tr valign="top">
<td>
<form name="ChronoContact_simple_form_01" id="ChronoContact_simple_form_01" method="post" action="http://joomtest/index.php?option=com_chronocontact&task=send&chronoformname=simple_form_01" >
<div class="form_item">
  <div class="form_element cf_heading">
    <h1 class="cf_text"> ...etc.


So, for example, how can I direct to the form to find this - '<table class="nopad">' and place inside itself?
GreyHead 24 May, 2010
Hi buzzet,

You have me completely lost. Why would you want to retrieve an HTML snippet like that?

Can you post a 'real' example, tha might be more useful.

Bob
buzzet 25 May, 2010
I think I've mess myself too🙂

Ok, another example.
The form is on the Page.html. There are the words 'bla bla bla' on this page.
How to catch these words from source code and send while the form is submitting?
Why I don't want to do it with DB query? That is because I'm thinking how to optimize server load and decrease the number of queries from generating page. One more thing I want to know: which way is faster - DB query or script work while page is generating?

Yesterday, when I was stuck with it, I thought to escape DB query, now I'm thinking this is a simplest and fastest method in comparison to analyze generating HTML 'on the fly'.
As the people saying - The Morning Is Wiser Than Evening!
GreyHead 25 May, 2010
Hi buzzet,

The DB query is likely to be much simpler than trying to grab all the page html and searching it for some particular phrase.

Bob
geoffr 17 Jun, 2010
This is my first post and I am amazed at the power of Chronoforms so far. I have searched the forum and tutorials for an answer, but so far not found it. (Forgive me if I am asking a simple question.)

I wish to know if it is possible to assign a Chronform to an existing page, rather than using the form as a page of its own.

My purpose is to build a product catalog and include my standard Chronoform on each product page (I would need to somehow add a dynamic identifier field so we know from what product the enquiry came).

Can this be done... if so how?

Thanks,
Geoff
Max_admin 18 Jun, 2010
Hi Geoff,

If your product catalog supports loading Joomla plugins/mambots then you can load the form there with that trick

but to add a unique identifier it become a bit harder, you need to have some PHP variable accessible in the whole page of the product so that you can load it through the Chronoform, or alternatively run some SQL query based on some request parameter

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
geoffr 18 Jun, 2010
Thanks Max, I'll check if it does, though I am a little unclear what you mean. Do you mean there may be a way to put the Chronoform in a module and insert it on the page that way?

Geoff
Max_admin 18 Jun, 2010
Yes, but not a module, I mean a plugin (mambot), its the tool used to insert it in Articles, but your product catalog extension may be supporting loading these mambots as well

Cheers
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
geoffr 18 Jun, 2010
ZOO 2.0 by YooTheme. I'll try to figure that out. Thanks.

Geoff
medzmay 18 Jun, 2010
thx for a lot knowledge
This topic is locked and no more replies can be posted.