passing value in cfv3

boboiboy 21 Oct, 2011
how can i pass value in chronoform....
i want the value submitted to be pull back to the form....
such as when making a transaction....
my total token is 5....
when user buy token,obviously the token will increase...

and when user apply it for next time...the new value for the token balance will appear...
like this.. :o

[attachment=1]122.png[/attachment]

this is my code in chronoform...
hope u can see it...
<div class="form_item">
  <div class="form_element cf_text"> <span class="cf_text">Arcade Arena</span> </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Card Number</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_1" name="cardnumber" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Arcade Location</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_7" name="arclocation" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Buy Token</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_2" name="buytoken" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Token Balance</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_5" name="tokenbal" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">After Balance</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_3" name="afterbal" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_textbox">
    <label class="cf_label" style="width: 150px;">Contact No.</label>
    <input class="cf_inputbox" maxlength="150" size="30" title="" id="text_6" name="contactno" type="text" />
  
  </div>
  <div class="cfclear"> </div>
</div>

<div class="form_item">
  <div class="form_element cf_button">
    <input value="Submit" name="button_4" type="submit" />
  </div>
  <div class="cfclear"> </div>
</div>
GreyHead 21 Oct, 2011
Hi boboiboy,

You'll need to Save the information in a database table and update it when the form is submitted. For security you should check the current value after the form is submitted using a Custom Code action, then save the updated value back to the table.

Bob

PS I'm sorry but we really aren't able to help much with questions like this which are about applications design rather than using ChronoForms.
boboiboy 24 Oct, 2011
hye bob,im sorry btw cause i thought i need to hack the backend code....
can u guide me a little on this...

tq😑
boboiboy 27 Oct, 2011
how can i using this code...
to make this calculation
<input type='hidden' . . .
  value='<?php echo $cf_data->column_name; ?>' />
GreyHead 27 Oct, 2011
Hi boboiboy ,

Sorry, I have no idea what the question is that you are asking????

Bob
boboiboy 28 Oct, 2011
hi bob,

how can i update the value in the field after submitting ....
just like my example above.........

does it involve the onsubmit or aftersubmit?
and how do i do it
GreyHead 28 Oct, 2011
Hi boboiboy,

Sorry that doesn't make the question any clearer :-(

Bob
boboiboy 31 Oct, 2011
i meant about the possibility to do that in chronoform....
how can i get back the current value after submitted a form....
such as the image shown in the 1st thread....
GreyHead 31 Oct, 2011
Hi boboiboy,

Assuming that you've saved the data in the database then you can relaod it using the Profile Page plug-in.

Bob
boboiboy 01 Nov, 2011
Hi Bob,

Profile page plug in can only display only one data...

i had three linked field here

[attachment=0]122.png[/attachment]

The Buy Token,Token Balance and After Balance is linked...
Is chronoform support such type of software like this to make
the balance carry forward with user ID?
How can i do it..

Sorry trouble you so much....
GreyHead 01 Nov, 2011
Hi boboiboy ,

ChronoForms supports it but it can't do the work for you. You need to design and write the code to make it happen or find someone to do that for you.

Bob
boboiboy 02 Nov, 2011
hi bob ,

yes, i will make it on my own coding...
but can i have some sort of foundation to code that..
just a simple code..
and where to put it in chronoform...

thanks bob,hope u really help me...
boboiboy 04 Nov, 2011
hi guys,

any1 can help me solve my problem....
really appreciate u guys...
medevilgirl 04 Nov, 2011
how can i using this code...
to make this calculation
boboiboy 14 Nov, 2011
how can i use this to do it

$database =& JFactory::getDBO();
$database->setQuery("SET @num := 0");
$database->query();
$database->setQuery("SET @num := @num + 5");
$database->query();
$database->setQuery("SELECT @num");
$result = $localDB->loadResult();



seems like i find a hard way to do it....
need guide plz
GreyHead 14 Nov, 2011
Hi boboiboy,,

Pleas check the MySQL manual for the correct format for database queries.

Bob
This topic is locked and no more replies can be posted.