[Grok-dev] AddForm Mystery Number
sebastian at urbantalk.se
Sun May 31 03:13:51 EDT 2009
Maybe this answers your question:
31 maj 2009 kl. 05.03 skrev Steve Schmechel:
> This may be more of a FormLib or zope.app.file question, but I came
> across it while working with the Grok how-to
> "Handling file uploads with zope.app.file and zope.file"
> When looking at the view created by:
> class Upload(grok.AddForm):
> form_fields =
> you can see that the HTML for the submit button is generated like:
> <input type="submit" id="form.actions.4164642066696c65"
> name="form.actions.4164642066696c65" value="Add file"
> class="button" />
> Where does the "magic number" 4164642066696c65 come from?
> Instead of moving to a separate page to upload a file, I want to
> file selection on the "Index" page along with the file listing.
> I am able to post to the "upload" view from my listing page as long as
> my submit button includes "form.actions.4164642066696c65".
> This number seems to be very static. I've restarted the server,
> new root applications, accessed the site from other clients. It all
> great, but I am fearful it will one day stop working because I did not
> understand the meaning of this number.
> Other grok.AddForm views do not generate this type of submit button.
> They look like:
> <input type="submit" id="form.actions.add" name="form.actions.add"
> value="Add" class="button" />
> Can someone please shed some light on this number?
> Should I not post to an auto-generated AddForm view from another view?
> Thank you,
> Grok-dev mailing list
> Grok-dev at zope.org
More information about the Grok-dev