Displaying 20 results from an estimated 84 matches for "redisplaying".
Did you mean:
displaying
2006 Mar 23
3
How to redisplay submitted data on validation error?
Hi!
If i have an object it''s easy.
But i''m making a simple contact form and i check if email address is
correct. If it''s not i redisplay the form with the info that there was
an error (should i use redirect_to or render :action? what''s the
difference?), but all previously submitted data is lost.
I tried creating variables using names of the form fields, but
2010 Jul 08
1
[Rails3] Issue in modifying locale and redisplaying page
In a test app, I have a drop-down selection to change the language of
the site.
I use an Ajax request to an action in which the locale is changed, and
the it''s redirected to the home page
unfortunately, the locale seems to be changed but the home page
doesn''t reflect the new language ..
application_controller.rb
.. before_filter :set_locale
def set_locale
I18n.locale =
2006 Apr 28
1
beginner - default form values
I want to build a simple calculator with 1 form and a results page.
The form will be redisplayed with an error message upon an invalid value
entered.
I won''t be using any database/active record for this.
The problem i have is when i return to the form page i want to redisplay
the values already entered in the form fields.
Should i use text_field (which seems to be tied to a model) or
2006 Apr 17
2
Refreshing RHTML page with previously posted data?
All,
After a POST, I want to be able to redisplay a view with the data that
was previously entered when my controller action notices a validation
failure and calls render on the view that does the submit.
Example:
View x.rhtml - text field is filled in
Call controller action
Controller action fails validation calls render (:action => ''x'')
x.rthml shows up with blank text
2005 Dec 26
3
Override Validation?
Hi all,
is there a way to override the validation methods so as to avoid the
div.fieldWithErrors divs from being created on the redisplayed form?
Many thanks in advance,
Nicky
2006 Apr 18
6
Best Practice for Returning to Calling Page?
I have a partial, it''s a shopping cart display, it''s designed to appear
on several different pages of my site.
One of the buttons on the shopping cart empties the cart, and then I
want the calling page to redisplay.
In other words, the cart controller needs to return the visitor to the
same page -- however since the cart could appear on any given page, this
has to be
2006 Feb 16
4
newbie question regarding basic AJAX form verification
Hi,
I''m confused about how form verification with AJAX works. Let''s say I have a
''new.rhtml'' view that contains a form with two fields, and the form action is
''create''. Let''s assume that I also want to do some type of data validation on
one of the two fields via AJAX before I submit the form. But since I''ve
already
2006 Feb 21
7
Validation issues
I have a form. Everything submits into the database if I don''t have any
validation rules. When I put these rules:
validates_uniqueness_of :title, :message => "already exists in
database"
validates_presence_of :title
I get this error (which seems weird because I am not validating against
that):
You have a nil object when you didn''t expect it!
You
2006 Jul 03
1
Model Relations, Creating, Errors and stuff
Hi,
I''ve searched the Agile.. book and tried google etc. but my main problem
is not being able to think of keywords.
I''m trying to save something with user info, and then further info if
they are staff in a one-to-one relationship. I can do this all fine and
good.
def create
@user = User.new(params[:user])
@staff_member = StaffMember.new(params[:staff_member])
2006 Jul 08
1
Ajax, RJS, and Standard Form Errors
Hi all,
I''m trying to take the standard scaffold and add a bit for ajax to it. I
have a two column page with the list on the left and the right side is
reserved for the create/edit actions. On a successful save my rjs executes
and updates the list view on the left and returns the right side to a "home"
page. However, if one of the model validations fail I use rjs ro
2006 May 15
4
Ajax callback w/o model update?
Is there a way to keep a controller instance variable across a
link_to_remote call?
In essence, I want the call to re-render a partial within my page with
different display parameters, but without doing another DB call. Is
there a simple way to do this?
2005 Mar 30
1
menu.c32, submenus
I am trying to create submenus, or more specifically a single submenu, using PXELINUX and the menu.c32. I have a tftp share with a basic config:
/ (root of tftp)
pxelinux.0
menu.c32
/diskdiag (dir)
/diskdiag/dskdiag.0
/pxelinux.cfg (dir)
/pxelinux.cfg/default
/pxelinux.cfg/dskdiag
one of the menu items in /pxelinux.cfg/default is as follows:
LABEL DISKDIAG
MENU LABEL [^B] Disk Diagnostics
2008 Jul 08
2
select helper still the worth thing in rails...
I have been trying all the day to make it happen, initial display is
fine , but I cannot redisplay the selected value once the choice is
done in my select helper
I setup my slector in a helper (need to include the first option
''all'', as a prompt is displayed only once....
in my partial
def company_role_selection(selection=nil)
roles= [[''all'', 0]]
2006 Feb 23
1
Ajax, validation, flash messages & redirects...
Hi everyone,
I''m working on an file upload page that uses an ajax progress bar
(http://sean.treadway.info/demo/upload/). I''ve also got validation on
the uploads (must be a certain file size/mime type etc). When uploads
pass validation - all is dandy. But when they fail - I can''t work out
how to redisplay the form with the flash error messages (that normally
appear
2006 Jan 22
3
file_column and tmp files
Hi again...
One more item.. the file_column plugin uses a tmp directory inside the
/public directory to store a temporary uploaded item. But it looks like
this folder is just going to grow and grow. Is there some way to clear
this out or not cause this to happen?
Thanks once again!
--
Posted via http://www.ruby-forum.com/.
2006 Jan 24
5
Password fields and security?
Hi all
I wanted to ask why Rails'' password_field helper uses the input password
as default value when reloading a form because of errors? Isn''t this a
potential security leak? On any other webs I''ve seen so far the password
fields have to be filled in again after every reload of the site so the
password doesn''t exist in plain text in the html code...
What
2006 Jan 24
2
DOCTYPE declaration:
I am playing around with the Agile Rails development book again and
thought to see what effect, if any, placing a doctype declaration
at the top of an rhtml file would have. When I insert any of the
three standard forms of such declaration at the top of
app/views/store.rhtml the product image disappears when the web
page is redisplayed. The error logged in log/development.log is:
>
2006 Feb 16
1
Help with validation
I am trying to write some simple code post a form, update the database
and do some validation. I have 2 problems:
1) The validation fails but I can''t get hold of the error message
2) I can''t get the form to redisplay the previously entered data for the
user to correct.
I have 2 controllers:
user and holiday.
A user can request a new holiday by filling in a form. I have a
2011 Dec 19
2
Jquery Modal Dialog with Jquery DatePicker field strange behavior
Hi people.
I need your help here, please.
I have a rails 3.0.9 app, and I''m using Ajax to save some records to
the database. To achieve this, I use a jquery modal form, but one of
the fields is a datepicker, and if I click on it to display the
calendar it doesn''t work.
The thing is, I press submit without fill all the fields, so, my
custom validations were shown, telling me
2006 Jul 16
17
AWDWR question
In an early section on Action View, showing code being put directly
into the rhtml file:
<% require ''date''
DAY_NAMES = %w{ Sunday Monday Tuesday Wednesday Thursday Friday Saturday }
today = Date.today %>
<h1>Hello, Dave</h1>
<p>
It''s <%= DAY_NAMES[today.wday] %>.
Tomorrow is <%= DAY_NAMES[(today + 1).wday %>.
</p>
I get this