This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

set default value as a php variable


  1. roydcarlson
    Member

    I have a robust security system on our website. In order for users to use the form I created, I require that they be registered and logged into our website. I would like several of the fields to be pre-populated for the user using the global variables I have setup for them (their name, address, phone, etc). Normally I would simply echo the variable (echo $globalvariable), but when I tried that as the default value in a form field, all that echoed was the $globalvariable, and not the value of the variable. I also tried <?php echo ... ?> but that echoed what I typed in (<?php echo ?>). How do I get machform to display a variable as the default value in a field??????

    Posted 14 years ago #
  2. yuniar

    You can't set a default value from a PHP variable.

    However, you can pre-populate a field using this method:
    http://www.appnitro.com/forums/topic/dynamic-content-php?replies=29

    You can also change the parameter with global variable or session variable.


    MachForm Founder

    Posted 14 years ago #

RSS feed for this topic

Reply