It should be 'input[type=text]' instead of "input[type='text']" (i.e., no
quotes around "text" when using that syntax).
Anthony
On Wednesday, September 12, 2012 1:59:57 PM UTC-4, Richard wrote:
>
> I will try, but Bruno's code was :
>
> for input in form.elements("input[type='text']"):
> input["_placeholder"] = placeholders.get(input["_name"], "")
>
> And it didn't catch anything...
>
> input[] return all the input...
>
> Anyway, I try and I report.
>
> Richard
>
> On Wed, Sep 12, 2012 at 1:11 AM, Anthony <[email protected]
> <javascript:>>wrote:
>
>> The proper code I come up with :
>>>
>>> {{{
>>> for input_elem in form.elements("input[]"):
>>> if input_elem.attributes['_type']**=='text':
>>> input_elem["_placeholder"] = YOURPLACEHOLDERTEXT
>>> }}}
>>>
>>>
>> Why not just form.elements('input[type=text]') or form.elements('input',
>> _type='text')?
>>
>> Anthony
>>
>> --
>>
>>
>>
>>
>
>
--