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 6747435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:26:30+00:00 2026-05-26T12:26:30+00:00

I am in the process of setting up a feedback form for my site

  • 0

I am in the process of setting up a feedback form for my site using codeigniters form helper.

My form has been created and validation implemented, all works.

My only problem is adding the set_value() function to repopulate the form if an error occurs.

I can’t get it to work on my radio inputs, how do you add the set_value() function to a radio type.

Code:

      <ul> 
          <li><?php echo form_radio('found_by', 'newspaper_advert', set_value('found_by')); ?> Newspaper advert</li>
          <li><?php echo form_radio('found_by', 'press_release', set_value('found_by')); ?> Press release</li>
          <li><?php echo form_radio('found_by', 'text_message', set_value('found_by')); ?> Text message</li>
          <li><?php echo form_radio('found_by', 'email', set_value('found_by')); ?> Email</li>
          <li><?php echo form_radio('found_by', 'refferal', set_value('found_by')); ?> Referred to by a friend</li>
          <li><?php echo form_radio('found_by', 'telemarketing', set_value('found_by')); ?> Telemarketing</li>
          <li><?php echo form_radio('found_by', 'leaflet_flyer', set_value('found_by')); ?> Leaflet or flyer</li>
          <li><?php echo form_radio('found_by', 'radio', set_value('found_by')); ?> Radio</li>
          <li><?php echo form_radio('found_by', 'television', set_value('found_by')); ?> Television</li>
          <li><?php echo form_radio('found_by', 'internet_advert', set_value('found_by')); ?> Internet advert</li>
          <li><?php echo form_radio('found_by', 'search_engine', set_value('found_by')); ?> Search engine</li>
          <li><?php echo form_radio('found_by', 'none', set_value('found_by')); ?> None of the above</li>
      </ul>
  • 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-26T12:26:31+00:00Added an answer on May 26, 2026 at 12:26 pm

    set_value only works on inputs and textareas. you need set_radio

    set_radio()

    Permits you to display radio buttons in the state they were submitted.
    This function is identical to the set_checkbox() function above.

    <input type="radio" name="myradio" value="1" <?php echo set_radio('myradio', '1', TRUE); ?> />
    <input type="radio" name="myradio" value="2" <?php echo set_radio('myradio', '2'); ?> />
    

    From doc page: http://codeigniter.com/user_guide/helpers/form_helper.html

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

Sidebar

Related Questions

I'm in the process of setting up TFS and have created a project with
I'm currently in the process of setting up my plone site to show expiration
We are in the process of setting up a new development environment for about
I am in the process of setting up a server to run a Ruby
I'm currently in the process of setting my website, largely with php. Though this
I'm currently in the process of setting up a media server for my dorm
I'm new to Ruby on Rails, and I'm in the process of setting it
I'm in the process of setting up a database with customer information. The database
I am in the process of setting up a QA environment for my GAE
I am in the process of setting up a complete web-development environment. For now,

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.