Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6539531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:52:11+00:00 2026-05-25T10:52:11+00:00

I have some input fields in my View. I want a link to be

  • 0

I have some input fields in my View. I want a link to be generated dynamically based off the user’s input into these fields.

My understanding is that normally, php cannot be updated after the page is rendered, but for some reason I think this is different in an MVC setup??

My solution – based on this assumption – is to store a php variable in the user input field. And call that variable where my link is generated.

example:
the input field, I want to store the input text into new variable $locationhold

<dt><label for="location_area" class="required">Area</label></dt>
    <dd><input type="text" name="location_area" id="location_area" value="<?php if($this->validation->location_area){ echo $this->validation->location_area; $locationhold=$this->validation->location_area; }else echo $property->location_area; ?>" class="required" /></dd>

and then somehow summon $locationhold and make it part of this link:

<a href="http://twitter.com/share" class="twitter-share-button" data-url="http://www.mysite.com/item/listing/<?php echo $locationhold ?>"  data-text="NEW POST!" data-count="none">Tweet</a>

anyway this doesn’t quite work, tips? the <?php echo ?> is ignored. My tweet says “New Post! http://www.mysite.com/item/listing/” and not the rest of the information that I wanted to dynamically append to the link. This may be because by the time the page rendered, $locationhold was still empty, but how can I retain a user modified value in it and achieve the result I am looking for

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T10:52:11+00:00Added an answer on May 25, 2026 at 10:52 am

    You need to post the user input to you server before transmitting to twitter. You would have your form post to your server where you would configure the locationhold, then you would configure your request to twitter and send the information along from the server instead of the client.

    Alternatively you could use ajax to submit the necessary info to figure out your locationhold to the server when the inputs are completed in the form, then inject the configured URL into the form client side before the user submits it to twitter.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some input fields in a page and i want to validate if
I have a drop down box and some text input fields below it. Based
i have a simple macruby application and i want to get some user-input via
I am using ASP.NET2.0. I have created a download form with some input fields
I have five fields for number input, and each of these fields must be
I want to have one label that is associated with the input field. Some
Say I have a website with some fields that I want to run some
I want to create a custom input view, some of whose buttons insert icons
We have some input data that sometimes appears with &nbsp characters on the end.
I have some input like this: aaaaa bbb \n cccccc\n ddddd \neeee And I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.