Results 1 to 5 of 5

Thread: Setting Form Edit Field with URL Parameters

  1. #1
    Junior Member
    Join Date
    Jun 2013
    Posts
    25

    Default Setting Form Edit Field with URL Parameters

    I am sending URL parameters /localhost/html/index.html?ComSource=1&RecID=1

    I want to set on one of the Form Edit Fields with the value of ComSource.

    I have tried several methods.
    I have put <?php echo $_GET["ComSource"[; ?> in the text field of the Form Edit Field parameters. It is not working. I need to verify that I am getting the parameters correctly because I will be passing them on to another page.

    I have even tried using $NOF_REQUEST->FORM["ComSource"] in pace of the GET statement.


    Ideally I will be passing the parameter on through the hidden field in the Forms Properties

    I am stuck I have searched the internet and my reference books all the examples do not work.

    The reason I am trying is, is that I will be using the same page to update a dbase from several other pages with the ComSource and RecID

  2. #2
    Senior Member chuckj's Avatar
    Join Date
    Jan 2010
    Location
    www.beyondfusion.com - Florida
    Posts
    1,302

    Default

    Might just be that your page file extension needs to be .php rather than .html.

    (-;
    Chuck Joslin
    www.BeyondFusion.com
    PHP & MySQL development with Fusion
    Fusion support for AllWebMenus (Likno) Contact me for custom AWM menus for your sites.
    Tutorials and Forums

  3. #3
    Junior Member
    Join Date
    Jun 2013
    Posts
    25

    Default

    The Page does not have a DB connector. There is only a Form. NOF does not create a php extension for the page. I tried the code on other pages that are .php and the same code does not work.
    Also I ran into a problem since the page is not a php page the calling page does not work if I use the POST method on the Form I had to use the GET.

    I am fairly new to php and my skills are not were I would like them.
    What is interesting is sometime the page renders with the code partially displayed in the field. The code stops at GET[. It appears there is an issue with the double quotes. I have tied single quotes with not success.

  4. #4
    Junior Member
    Join Date
    Jun 2013
    Posts
    25

    Default

    I found my problem. As was stated I needed to force NOF to create a .PHP by putting a DB connector and the <? php echo $NOF_REQUEST->FORM("xxx"); ?> works.

  5. #5
    Senior Member chuckj's Avatar
    Join Date
    Jan 2010
    Location
    www.beyondfusion.com - Florida
    Posts
    1,302

    Default

    You don't need the DB connector. True, it forces the page extension, but all you really need to do is change the file extension for the page in Site View.

    I have some PHP/MySQL tutorials on BeyondFusion that you may find helpful.
    Chuck Joslin
    www.BeyondFusion.com
    PHP & MySQL development with Fusion
    Fusion support for AllWebMenus (Likno) Contact me for custom AWM menus for your sites.
    Tutorials and Forums

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •